Page 86 - Bebop to The Boolean Boogie An Unconventional Guide to Electronics Fundamentals, Components, and Processes
P. 86
Binavy Arithmetic
Due to the fact that digital computers are constructed from logic gates
that can represent only two states, they are obliged to make use of the binary
number system with its two digits: 0 and 1. Unlike calculations on paper where
both decimal and binary numbers can be of any size-limited only by the size
of your paper, the endurance of your pencil, and your stamina- the numbers
manipulated within a computer have to be mapped onto a physical system of
logic gates and wires. Thus, the maximum value of a number inside a computer
is dictated by the width of its data path; that is, the number of bits used to
represent that number.,
Unsigned Binary Numbers
Unsigned binary numbers can only be used to represent positive values.
Consider the range of numbers that can be represented using 8 bits (Figure 8-1).
Each ‘x’ character represents a single bit; the right-hand bit is known as the
least significant bit (LSB) because it represents the smallest value. Similarly, the
left hand bit is known as the most significant bit (MSB) because it represents the
largest value.
In computing it is usual to commence indexing things from zero, so the
least significant bit is referred to as bit 0, and the most significant bit (of an
8-bit value) is referred to as bit 7. Every bit can be individually assigned a value
of 0 or 1, so a group of 8 bits can be assigned 28 = 256 unique combinations of
Os and 1s. This means that an 8-bit unsigned binary number can be used to
represent values in the range O,, through +255,,.
1 Actually, this isn’t strictly true, because there are tricks we can use to represent large numbers
by splitting them into smaller “chunks” and re-using the same bits over and over again, but
that’s beyond the scope of what we’re looking at here.