Digital logic & computing · tree view
Binary and hexadecimal are place-weighted number systems that map cleanly onto two-state electronics; Boolean algebra is the two-value mathematics (OR, AND, NOT, De Morgan) used to predict and simplify the behaviour of digital circuits.
But the primary reason that the binary numeration system is used in modern electronic computers is because of the ease of representing two cipher states (0 and 1) electronically. With relatively simple circuitry, we can perform mathematical operations on binary numbers by representing each bit of the numbers by a circuit which is either on (current) or off (no current).
To convert a number in binary numeration to its equivalent in decimal form, all you have to do is calculate the sum of all the products of bits with their respective place-weight constants.
Octal and hexadecimal numeration systems would be pointless if not for their ability to be easily converted to and from binary notation. Their primary purpose in being is to serve as a "shorthand" method of denoting a number represented electronically in binary form. Because the bases of octal (eight) and hexadecimal (sixteen) are even multiples of binary's base (two), binary bits can be grouped together and directly converted to or from their respective octal or hexadecimal digits.
This other method uses repeated cycles of division (using decimal notation) to break the decimal numeration down into multiples of binary, octal, or hexadecimal place-weight values. In the first cycle of division, we take the original decimal number and divide it by the base of the numeration system that we're converting to (binary=2 octal=8, hex=16). Then, we take the whole-number portion of division result (quotient) and divide it by the base value again, and so on, until we end up with a quotient of less than 1.
However, Claude Shannon of MIT fame recognized how Boolean algebra could be applied to on-and-off circuits, where all signals are characterized as either "high" (1) or "low" (0). His 1938 thesis, titled A Symbolic Analysis of Relay and Switching Circuits, put Boole's theoretical work to use in a way Boole never could have imagined, giving us a powerful mathematical tool for designing and analyzing digital circuits.
It should be clearly understood that Boolean numbers are not the same as binary numbers. Whereas Boolean numbers represent an entirely different system of mathematics from real numbers, binary is nothing more than an alternative notation for real numbers. The two are often confused because both Boolean math and binary notation use the same two ciphers: 1 and 0.
Since the sum "1 + 1" certainly isn't 0, it must be 1 by process of elimination.
DeMorgan's theorem may be thought of in terms of breaking a long bar symbol. When a long bar is broken, the operation directly underneath the break changes from addition to multiplication, or vice versa, and the broken bar pieces remain over the individual variables.
If we translate a logic circuit's function into symbolic (Boolean) form, and apply certain algebraic rules to the resulting equation to reduce the number of terms and/or arithmetic operations, the simplified equation may be translated back into circuit form for a logic circuit performing the same function with fewer components. If equivalent function may be achieved with fewer components, the result will be increased reliability and decreased cost of manufacture.
With analog representation, the quantity is symbolized in a way that is infinitely divisible. With digital representation, the quantity is symbolized in a way that is discretely packaged.
The terms unit and number when used with the decimal system are almost self-explanatory. By definition the unit is a single object; that is, an apple, a dollar, a day. A number is a symbol representing a unit or a quantity.
These two types are the ones (R’s-1) complement and the twos (R’s) complement. The binary system R’s-1 complement is the difference between the binary number and all 1s. The R’s complement is the difference between the binary number and the next higher power of 2.
Hex is binary shorthand: split the bits into groups of four from the right (add leading zeros to fill the last group), convert each 4-bit group to one hex digit (A=10 … F=15). Going the other way, expand each hex digit into four bits. Decimal comes from the place-weight sum, or from repeated division by 2 (remainders, LSB first).
To predict the outcome:
| given | binary | hexadecimal | decimal |
|---|---|---|---|
| 11010110₂ | 1101 0110 | D6₁₆ | 214₁₀ |
| 10010111₂ | 1001 0111 | 97₁₆ | 151₁₀ |
| 3F₁₆ | 0011 1111 | 3F₁₆ | 63₁₀ |
| A4₁₆ | 1010 0100 | A4₁₆ | 164₁₀ |
| 87₁₀ (repeated ÷2) | 1010111 | 57₁₆ | 87₁₀ |
| 200₁₀ (repeated ÷2) | 11001000 | C8₁₆ | 200₁₀ |
A few landmark values anchor every conversion: one hex digit covers exactly 0–15 (one nibble), 8 bits cover 0–255, and each extra bit doubles the count (2ᵇ values, from 0 to 2ᵇ − 1).
To predict the outcome:
| decimal | binary | hexadecimal | note |
|---|---|---|---|
| 0 | 0 | 0₁₆ | the same zero in every base |
| 9 | 1001 | 9₁₆ | largest single decimal digit |
| 10 | 1010 | A₁₆ | hex borrows letters from here |
| 15 | 1111 | F₁₆ | one full nibble, all ones |
| 16 | 1 0000 | 10₁₆ | rolls over to two hex digits |
| 128 | 1000 0000 | 80₁₆ | MSB alone in a byte |
| 255 | 1111 1111 | FF₁₆ | every bit set — byte maximum |
Each identity below is a claim that two expressions agree for every possible input. Because inputs are only 0/1, you can prove each one by brute force: check both values of A (and all four pairs for two-input identities). That is exactly how the verdict column was computed.
To predict the outcome:
| identity | claim | verdict |
|---|---|---|
| A + A′ = 1 | a variable OR its complement is always 1 | verified — true for A=0 and A=1 |
| A · A′ = 0 | a variable AND its complement is always 0 | verified — true for A=0 and A=1 |
| A + 1 = 1 | OR with 1 forces the output high | verified — true for A=0 and A=1 |
| A · 1 = A | AND with 1 leaves the signal alone | verified — true for A=0 and A=1 |
| A + A·B = A | the B term is absorbed | verified — equal on all 4 input pairs |
| (A + B)′ = A′ · B′ | De Morgan: NOR = negative-AND | verified — equal on all 4 input pairs |
| (A · B)′ = A′ + B′ | De Morgan: NAND = negative-OR | verified — equal on all 4 input pairs |
| (A′)′ = A | double complement cancels | verified — true for A=0 and A=1 |