- The word code usually means a system for transferring information among people and machines. In other words, a code lets you communicate. Sometimes we think of codes as secret. But most codes are not. Indeed, most codes must be well understood because they're the basis of human communication.
- Two different anything, really, can with suitable combinations convey all types of information.
- Just as Morse code provides a good introduction to the nature of codes, the telegraph provides a good introductions to the hardware of the computer.
- The prevailing scientific wisdom regarding the working of electricity is called the electron theory, which says that electricity derives from the movement of electrons.
- The invention of the telegraph truly marks the beginning of modern communication. For the first time, people were able to communicate further than the eye could see or the ear could hear and faster than a horse could gallop.
- Using a base-ten, or decimal, number system is completely arbitrary. Yet we endow numbers based on ten with an almost magical significance and give them special names.
- The lowly zero is without a doubt one of the most important inventions in the history of numbers and mathematics. It supports positional notation because it allows differentiation of 25 from 205 and 250. The zero also eases many mathematical operations that are awkward in non-positional systems, particularly multiplication and division.
- By reducing our number system to just the binary digits 0 and 1, we've gone as far as we can go. We can't get any simpler. Moreover, the binary number system bridges the gap between arithmetic and electricity.
- A wire can be a binary digit. If current is flowing through the wire, the binary digit is 1. If not, the binary digit is 0.
- What's special about binary is that it's the simplest number system possible. There are only two binary digits--0 and 1. If we want something simpler than binary, we'll have to get rid of the 1, and then we'll be left with just a 0. We can't do much of anything with just a 0.
- The word noise is used in communication theory to refer to anything that interferes with communication.
- The essential concept here is that information represents a choice among two or more possibilities.
- The flip side of this is that any information that can be reduced to a choice among two or more possibilities can be expressed using bits.
- Binary numbers can be either signed or unsigned. Unsigned 8-bit numbers range from 0 through 255. Signed 8-bit numbers range from -128 through 127. Nothing about the numbers themselves will tell you whether they're signed or unsigned.
- A flip-flop circuit retains information. It "remembers".
- A processor includes a register called the Program Counter that contains the memory address the processor uses to retrieve the instructions that it executes. Normally the program counter causes the processor to execute instructions that are located sequentially in memory. But some instructions--usually named jump or branch or GOTO--cause the processor to deviate from this steady course. Such instructions cause the program counter to be loaded with another value. The next instruction that the processor fetches is somewhere else in memory.
- The call and return instructions are extremely important features of any processor. They allow a programmer to implement subroutines, which are snipets of frequently used code. Subroutines are the primary organizational elements of assembly-language programs.
- Bandwidth is an extremely important concept in communication, and it relates to the amount of information that can be transferred over a particular communication medium.
- In object-oriented programming, an object is a combination of code and data. The actual way in which the data in an object is stored is understood only by code associated with the object. Objects communicate with one another by sending and receiving messages, which give instructions to an object or ask for information from it.
20180407
CODE by Charles Petzold
Labels:
books
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment