How does RAM give "4"th value when CPU requests the "001"th

  • Thread starter Thread starter NotASmurf
  • Start date Start date
  • Tags Tags
    cpu Ram Value
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
4 replies · 2K views
NotASmurf
Messages
150
Reaction score
2
Hey all, I'm currently building a 8 bit CPU and ram in simulator software but have no idea how to call a specific memory cell, ie I can't call the "001"(binary) cell, I'd want it to be translated to call the 4th cell. How does real ram solve that issue? Any help appreciated, thanks.
 
Engineering news on Phys.org
While that looks like a strange convention: the 4th ram cell should check if the bits are "001", and get read out if this is true.
 
  • Like
Likes   Reactions: NotASmurf
Does ram seriously have this on each cell? Doesn't it have a binary to decimal decoder or something?
 
A binary to "every single RAM cell" decoder has one logic element for every single RAM cell.
In actual hardware this is not true as RAM forms a 2D array with row and column addresses, but there each row and each column needs such an element in the decoder. On the other hand, each memory address has more than one bit so you have to think about the actual implementation of it. I don't know how realistic your simulation is supposed to be.
 
You need to implement address decoding.

In a simple implementation you would feed your 3 address bits to a 3:8 decoder. Each output of the decoder goes to a 'memory segment enable' input which let's the decoder control which segment is being accessed at a given moment (since a decoder only has one high output at a given moment).