Everyone knows that computer programs are made of bits - the ones and zeros that hold all the information that keeps our modern life running. But how do you get from numbers to programs - how simple ones and zeros do anything? The answer is logic gates (as well as a whole bunch of stuff about how electronics are built - you need to actually make these logic gates on out of circuits in order for our logic structures to be enacted; but I'm a programmer, not an electrical engineer, so let's not go there). A logic gate is what's known as a Boolean function , a mathematical operation that takes in bits and spits out more bits. Each logic gate takes in two bits of information (as mentioned before, generally denoted as a 1 (also sometimes represented as true ) or a zero (also sometimes represented as false )), so there are four possible inputs to a logic gate: {0, 0}, {0, 1}, {1, 0}, and {1, 1}. For each of these inputs, a logic gate can spit out either a 1 or a 0, so t...
Comments
Post a Comment