Active 3 years, 5 months ago. Viewed 64k times. Improve this question. Peter Cordes k 39 39 gold badges silver badges bronze badges. Please see byte- vs. Add a comment. Active Oldest Votes. A byte is a memory unit for storage A memory chip is full of such bytes.
It means: A binary address always points to a single byte only. A word is just a group of bytes — 2 , 4 , 8 depending upon the data bus size of the CPU. Improve this answer. Chen Li 4, 2 2 gold badges 20 20 silver badges 45 45 bronze badges.
KawaiKx KawaiKx 8, 16 16 gold badges 65 65 silver badges 94 94 bronze badges. From what I've understand your answer, there should be some sort of a circuitry in the CPU to decide whether the memory operation targets a byte or word, especially when the data has arrived back to the MDR, for instance, to read only the first byte of bit data bus.
But I'm doubtfulI that it's a right assumption? Maaverik Maaverik 1 1 silver badge 8 8 bronze badges. Peter Cordes Peter Cordes k 39 39 gold badges silver badges bronze badges.
And C11 would require that, if it supports threading: writing one char array element must not do a non-atomic RMW of the containing word, because that could introduce data races not present in the source.
My understanding is that some modern DSPs are still word-addressable. But I didn't know that 5 years ago. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password.
Post as a guest Name. Email Required, but never shown. The Overflow Blog. Does ES6 make JavaScript frameworks obsolete?
So bytes can be at any byte-address, bit words must be at an even address, and bit words at an address that is a multiple of four. Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Learn more. Byte addressable vs bit addressable Ask Question. Asked 5 years, 5 months ago. Active 4 years, 11 months ago. Viewed 5k times. Why are most computers byte addressable instead of bit addressable?
Bit addressable advantages: Booleans have size of one bit. You can directly access single bits in integers without some dirty hacks like shifting. Byte addressable advantages:??? Improve this question. Ford O. Possible duplicate of How many bits' address is required for a computer with n bytes of memory? See also How does word size affect the amount of virtual address space available? Huge waste of address space with minimum to no gain.
This was especially relevant at times when memory addresses where less than 64bit. Though it still would not make much sense.
Add a comment. Active Oldest Votes. Improve this answer. Intel was also byte addressable having word size of 8 bits.
In first figure we can see there are bytes in the ram, so ram size is bytes. In word addressable cpu accesses 4 bytes at a time using 32 bits bidirectinal data bus but in byte addressable size of the data bus is 8 bits. Byte addressable memory are read only, that is we can't write to word addressable memory. The size of these register depends upon the computer architecture. When cpu is on to fetch any data or instruction from memory, it places the 32 bit memory address into MAR. This address is then used to calculate the address of memory word in main memory.
Since, the size of memory word is 4 bytes. Two higher order bits of 32 bit memory address are generally discarded to make it a 30 bit address and placed in the MAR. The 30 bit address is used to access a memory word. Address 0 points to first memory word that is bytes , address 1 points second word that is, bytes and so on. The respective memory word is fetched and stored in the MDR. If we consider the same ram size of 4 GB a byte addressable memory generally does not have such huge memory.
0コメント