Code to electrical signal

5 points by pencil ↗ HN
how does a computer program that we write eventually gets converted to electrical signals (after turning into zero's and one's)and flows along the bus to wherever it is destined to?what are the steps involved in this process? i couldn't find a very detailed information on this .i would be very glad if someone could explain this.

5 comments

[ 5.0 ms ] story [ 27.0 ms ] thread
Google "from nand to tetris", there are many versions around, text video etc. It starts with a "nand" gate - an electrical device that for all practical purposes has two binary inputs x,y and one output z with this mapping:

  x=0,y=0 => z=1
  x=1,y=0 => z=1
  x=0,y=1 => z=1
  x=1,y=1 => z=0
where usually "0" is represented by zero volts and "1" is represented by e.g. 5 volts.

(As for how a nand gate is actually built -- well, how much electronics/physics do you know? if not much, just assume it magically does. A lego version that works with levers instead of voltages can be found here http://goldfish.ikaruga.co.uk/ornand.html )

(edit: formatting)

Welcome to Computer Engineering 101!

At the heart of it all are transistors. I'll talk about MOSFETs, Metal Oxide Semiconductor Field Effect Transistors. The word semiconductor is important because it means that a MOSFET can be told to conduct or not, which means it can be used to open and close circuits. This is the heart of digital computing.

There are two kinds, created by putting different kinds of gas (doping) on to silicon. N and P type. Each transistor has 3 important points, the source, drain and gate. If you apply a "1" to the gate, the transistor will either open or close, based on whether it is N or P, and allow a signal to move between the source and the gate. You can pair these N and P type transistors to make CMOS or Complementary Metal Oxide Semiconductor circuits.

If you're really interested, I imagine there should be some good tutorials on how to make a simple microprocessor using a hardware description language like Verilog.