Wikipedia:Reference desk/Archives/Computing/2017 April 15

From Wikipedia, the free encyclopedia
Computing desk
< April 14 << Mar | April | May >> April 16 >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


April 15[edit]

Physically reading Stored information[edit]

When the computer reads a RAM or microchip address, what does physically read the address? I assume there's no physical needle or moving parts inside there. — Preceding unsigned comment added by 31.4.147.242 (talk) 14:18, 15 April 2017 (UTC)[reply]

You are correct that there are no moving parts as there are in hard drives. The addressing is all electronic. See Address bus. Dbfirs 15:16, 15 April 2017 (UTC)[reply]
The quick version is: It's all controlled by entirely electrical switches. When the correct sequence of switches is 'flipped', the only accessible part of the memory is the one holding the data your program is looking for. That sequence is then known as the memory address. ᛗᛁᛟᛚᚾᛁᚱPants Tell me all about it. 18:11, 15 April 2017 (UTC)[reply]
here's a simple model of a 4-bit dynamic RAM. Basically, the address decoder logic selects which of the memory cells is connected to the input of a reading amplifier. Writing a 1 to a cell puts a certain voltage across that cell's capacitor, charging it, while writing a 0 shorts it to ground and discharges it. After a certain time (~300ms simulated time), however, the cap discharges via the mosfet, anyway, because the reading amplifier has a finite input impedance (and the voltage tends to equalize across all of the caps because they're all in parallel, mosfet notwithstanding.) That's where refresh comes in - were one to toggle the refresh switch quick enough, that would put the output voltage from the reading amplifier across the cap, preserving the cell's state (a bit like a missing pulse detector.)
It's all simpler yet in a static (as opposed to dynamic) RAM in which the memory cells are pairs of transistors that can stay in one state indefinitely without a need for refresh Asmrulz (talk) 08:46, 16 April 2017 (UTC)[reply]
In Assembler code writing, there is an analogy to a moving needle. You can read the contents (byte or word) at a specific address by making the DI or SI pointer point to it and then read the contents into one of the registers. For example, to read the contents of the byte at the defined address height, whose value can be 0-255, set di or si to height, then move (mov) the contents into AL register:
mov di, offset [height]
mov al, [di]
In that 5 or 6 bytes of code, AL register now contains the value and you can do lots of things with it, such as print it, perform arithmetic on it. To read a word, where height can be 0-65535, simply define height as a word and change AL to register AX. Akld guy (talk) 03:39, 17 April 2017 (UTC)[reply]