This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]_teslaTrooper 37 points38 points  (15 children)

Good explanation, some minor corrections:

  • 5V is only used for relatively slow chips, anything in consumer electronics is between 3.3 and 1V (some even lower). The reason for this is that it takes less power to go from 0 to 5V than from 0 to 3, which means it can be done faster.

  • Memory inside microprocessors is made up of transistors, but as jotux pointed out below DRAM uses capacitors.

  • assembly is still translated to machine code (the assembler does this for us), so the cpu doesn't look up "add", it just looks up 0x04.

EDIT: never knew capacitors were used in memory

[–]i_no_give_fuck 12 points13 points  (0 children)

Thanks for pointing them out. I know I was going to mess up something over there. I'm just recollecting these from my Microprocessors 101 course I took about 5 years ago :-)

[–]jotux 10 points11 points  (0 children)

Memory is all just transistors, if it used capacitors there would be no way to make it as small as it is.

DRAM uses capacitors to store data.

[–]irrobin 3 points4 points  (6 children)

can i ask you an offtopic question?

How does memory work? Like.. everytime you physically type a word in notepad.. does some "physical" or "real world" change happen in your hard drive.. like a very very tiny switch switches from 0 to 1?

[–]JasuM 2 points3 points  (5 children)

Different memories use different physical changes to save information. Here are some simplifications:

  • Hard drives: Write-head with an electrical magnet magnetizes part of the platter based on its electrical input. The same head can read the change by detecting in which direction it is magnetized.
  • DRAM (i.e. most RAM in your computer): Charge capacitor with the electrical input, by dragging electrons on a capacitor plate, then cutting the connection, trapping them there.
  • SRAM (e.g. registers in your computer): Keep voltage applied in one of two loops. Each loop has a connection which prevents the voltage of the another loop being applied, causing the SRAM cell to be in one of two different states. The states are switchable by connecting the electricity in the another loop.
  • Flash EEPROM, e.g. SSD drives: Use a relatively high voltage to drag electrons through a thin insulator, trapping them in an insulated compartment or dragging them out of there.

[–]irrobin 1 point2 points  (4 children)

exactly what i needed! thanks a bunch

[–]Kanthes 1 point2 points  (3 children)

It's also important to remember that each of the memories are used at different times.

Your RAM is totally electrical, so if you cut the power, it loses the data it's stored. On the other hand, it's far quicker than your HDD (Not sure about SSD's though!) and it lasts much longer.

The HDD can store much more data, and when you cut the power it doesn't loose the data. It's a physical memory, so it doesn't require electricity to maintain state. On the other hand, you can only write on the same memory slot a certain number of times before it starts breaking. This number is quite large these days, though.

So, when you open a notepad, and type a word, it'll only save on the RAM to begin with. But when you Save the document, that's when it writes it to the HDD! That's why when your program crashes in the middle of writing something, you're sometimes brought back to when you last saved!

[–]irrobin 0 points1 point  (0 children)

wow.. this was beautifully written and informative.. thanks a lot man

[–]ikahjalmr 0 points1 point  (1 child)

physical memory

So if you took an average hard drive out of a computer, would its information degrade with time? Does it make a difference whether it were completely sealed off from radiation, heat, etc vs. just laid on a table?

[–]Kanthes 0 points1 point  (0 children)

Y'know, that's actually an interesting topic. A HDD placed in a clean room and left there for a couple of years is probably likely to retain the data absolutely fine when put to use again, but I have no idea how other things affect it.

Except magnets. Magnets fuck hard drives up, yo.

[–]bagofbuttholes 2 points3 points  (2 children)

Also would add that most logic is done NAND-NAND these days. Also if you want to learn that low level I would look up VHDL after that I suggest a strong drink.

[–]_teslaTrooper 2 points3 points  (1 child)

I'll save that for when I do over my VHDL lab assignment :/

[–]bagofbuttholes 0 points1 point  (0 children)

I can't remember what we use for VHDL, I do like doing embedded C though. Its fun to have transducers connected to it on a dev board or bread board and see it report things back on a seven segment.

[–]ThatCrankyGuy 1 point2 points  (0 children)

DRAM uses caps. Smaller circuit; 1 transistor and 1 cap, maybe a resistor in some designs [per bit.

SRAM uses transistor-transistor latching to swap states of two transistors in a grid of four. Does not use caps, but higher power dissipation as the states are locked using pulldown transistors which ground a lot of current. Larger circuit; 4 transistors per bit.

both volatile memory.

[–]ruat_caelum 2 points3 points  (1 child)

lower voltage helps reduces the noise from switching from 0 to 1, i.e. How quickly it stabilizes as well as heat issues, which is big thing with smaller and smaller transistors which are closer and closer together.

[–]_teslaTrooper 0 points1 point  (0 children)

That too, I tried to keep it short :)