If a system has RAM containing 16K bytes with each of them needing their own distinct address and on top of that it has 16 peripherals and they each require 2^4 distinct addresses, then how many total addresses are required for this system? Based on what I know about memory, I think it's 2^16k + 16*2^4 however I'm not sure how to translate bytes to bits. I know that if a system has 15 bits then it requires 2^18 distinct addresses but what about bytes?
The total number of addresses in use in the system described would be 16384+16*2^4 for a total of 16640 addresses. In order to address 16640 addresses, you need an address bus with at least 15 address lines, which could address a maximum of 32768 addresses, so 16128 addresses would be unused. This is assuming that your RAM is organized in 8 bit words and is read 8 bits at a time. If for instance, the RAM is organized as 16 bit words, then each address would access two bytes of RAM, then you would need (16k/2)= 8192+16*2^4 or 8448 addresses. Each peripheral still takes one address, but since each address of RAM is now 16 bits wide, you only need half as many addresses for the RAM, but you need 16 data bus lines. If your RAM is organized as 32 bit words, then you need 4096+16*2^4 or 4352 addresses, if for 64 bit words, 2048+16*2^4 or 2304 addresses.
In a system each byte is addressed individually. There are 1024 bytes in one k byte. A 16k ram would therefore need 1024*16 = 16384 addresses. Add to that 16*2^4 for the peripherals and you get 16640. You then require at least 15 bits to represent those addresses.