# How many bits would be needed for the byte?

The Problem: A high speed workstation has 64 bit words and 64 bit addresses with address resolution at the byte level. Assuming a direct mapped cache with 8192 64 byte lines, how many bits are in each of the following address fields for the cache? 1) byte 2) Index 3) Tag?

I know that an address for specifying data within a cache is 64 bits.
I know that an address for a cache has to have the byte, index, and tag field so
byte + index + tag = 64
The index field should take up 13 bits to account for the 8192 byte lines

How many bits would be in the byte field though? I know that a processor processes one word at a time and each word consists of 8 bytes. A 64 byte cache line would contain 8 words. Would this byte field need to identify each word or each byte itself. If it was byte itself, it be 6 bits but if it was word it be 3 bits.

If I had to take a stab, I would say the byte field needs to be 3 bits to identify each word because it doesn't make sense for the processor to just process one byte. Can anyone confirm my suspicisions?

• You should write down address bits : 64bits addresses =A[63:0]. 64bits bus = 8 bytes =A[2:0] for selecting bytes within a longword. 64bytes lines =A[5:0], 8192 lines = A[18:6], Tags = A[63:19] ... There is one tag per cache line, so 8192*25 bits for tags, 8129*64*8 bits for data. There is a few other details needed, for example one additional "Valid" bit per tag. Jun 6, 2015 at 18:43
• So it would be 3 bits to select a word in a cache line? So I was correct? Jun 6, 2015 at 18:54
• Yes. 3 bits are needed (A[5:3]) for selecting which 64bits word is addressed within the 64 bytes cache line. Jun 7, 2015 at 11:41
• Maybe this thread would help: cs.stackexchange.com/questions/33818/… Aug 21, 2015 at 2:56