Code: The Hidden Language of Computer Hardware and Software
Rate it:
5%
Flag icon
The chemicals in batteries are chosen so that the reactions between them generate spare electrons on the side of the battery marked with a minus sign (called the negative terminal, or anode) and demand extra electrons on the other side of the battery (the positive terminal, or cathode).
5%
Flag icon
We normally like to think of a battery as providing electricity to a circuit. But we’ve seen that we can also think of a circuit as providing a way for a battery’s chemical reactions to take place. The circuit takes electrons away from the negative end of the battery and delivers them to the positive end of the battery. The reactions in the battery proceed until all the chemicals are exhausted, at which time you throw away the battery or recharge
5%
Flag icon
Voltage refers to a potential for doing work. Voltage exists whether or not something is hooked up to a battery.
5%
Flag icon
Current is related to the number of electrons actually zipping around the circuit. Current is measured in amperes, named after André Marie Ampère (1775–1836), but everybody calls them amps, as in “a 10-amp fuse.” To get one amp of current, you need 6,240,000,000,000,000,000 electrons flowing past a particular point per second.
5%
Flag icon
Now let’s connect the positive and negative terminals with a short piece of copper wire (and from here on, the insulation on the wires won’t be shown): This is known as a short circuit. The voltage is still 1.5, but the resistance is now very, very low.
6%
Flag icon
The watt is a measurement of power (P) and can be calculated as P = E x I
6%
Flag icon
Once you have established a common part of the circuit, you don’t have to use wire for it. You can replace the wire with something else. And what you can replace it with is a giant sphere approximately 7900 miles in diameter made up of metal, rock, water, and organic material, most of which is dead. The giant sphere is known to us as Earth.
6%
Flag icon
To use the earth as a conductor, you can’t merely stick a little wire into the ground next to the tomato plants. You have to use something that maintains a substantial contact with the earth, and by that I mean a conductor with a large surface area. One good solution is a copper pole at least 8 feet long and ½ inch in diameter. That provides 150 square inches of contact with the earth. You can bury the pole
7%
Flag icon
Yes, the earth is a massive conductor of electricity, but it can also be viewed as both a source of and a repository for electrons. The earth is to electrons as an ocean is to drops of water. The earth is a virtually limitless source of electrons and also a giant sink for electrons.
7%
Flag icon
Morse couldn’t use a lightbulb as his signaling device because a practical one wouldn’t be invented until 1879. Instead, Morse relied upon the phenomenon of electromagnetism.
8%
Flag icon
Although Samuel Morse notified the patent office in 1836 that he had invented a successful telegraph, it wasn’t until 1843 that he was able to persuade Congress to fund a public demonstration of the device. The historic day was May 24, 1844, when a telegraph line rigged between Washington, D.C., and Baltimore, Maryland, successfully carried the biblical message: “What hath God wrought!”
8%
Flag icon
A relay is like a sounder in that an incoming current is used to power an electromagnet that pulls down a metal lever. The lever, however, is used as part of a switch connecting a battery to an outgoing wire. In this way, a weak incoming current is “amplified” to make a stronger outgoing current.
17%
Flag icon
any information that can be reduced to a choice among two or more possibilities can be expressed using bits.
21%
Flag icon
The collection of his teachings known as the Organon (which dates from the fourth century B.C.E.) is the earliest extensive writing on the subject of logic.
21%
Flag icon
The basis of Aristotle’s logic was the syllogism.
22%
Flag icon
The + symbol in Boolean algebra means a union of two classes. A union of two classes is everything in the first class combined with everything in the second class. For example, B + W represents the class of all cats that are either black or white.
22%
Flag icon
The x symbol in Boolean algebra means an intersection of two classes. An intersection of two classes is everything that is in both the first class and the second class.
33%
Flag icon
The total speed of the adder is equal to the number of bits times the speed of the Full Adder component. This is called a ripple carry. Faster adders use additional circuitry called a look-ahead carry that speeds up this process.
33%
Flag icon
For this explanation, I need to refer to the two numbers being subtracted. Their proper names are the minuend and the subtrahend. The subtrahend is subtracted from the minuend, and the result is the difference:
38%
Flag icon
42%
Flag icon
Because each binary digit corresponds to a power of 2, we can simply write down the digits of the binary number and the powers of 2 underneath. Multiply each column and add up the products. Here’s
42%
Flag icon
For each division, the quotient is a binary digit and the remainder is divided by the next smallest power of 2. Here’s the conversion of 182 back to binary:
44%
Flag icon
Here’s a template for converting any 4-digit hexadecimal number to decimal:
50%
Flag icon
Number of values in RAM array = 2Number of Address inputs
51%
Flag icon
A kilobyte is approximately a thousand bytes, a megabyte is approximately a million bytes, a gigabyte is approximately a billion bytes, and a terabyte is approximately a trillion bytes.
51%
Flag icon
to provide you with a little grounding here, home computers purchased at the time this book was written (1999) commonly have 32 MB or 64 MB or sometimes 128 MB of random access memory. (And don’t get too confused just yet—I haven’t mentioned anything about hard drives; I’m talking only about RAM.) That’s 33,554,432 bytes or 67,108,864 bytes or 134,217,728 bytes.
51%
Flag icon
So if you have a 64K x 8 RAM array filled to the brim with 65,536 of your favorite bytes and you turn off the power to it, what happens? All the electromagnets lose their magnetism and with a loud thunk, all the relay contacts return to their untriggered states. And the contents of this RAM? They all go POOF! Gone forever. This is why random access memory is also called volatile memory. It requires a constant supply of electricity to retain its contents.
51%
Flag icon
The human species is often amazingly inventive and industrious but at the same time profoundly lazy.
57%
Flag icon
Controlled repetition or looping is what separates computers from calculators. I’ve