2.2 Binary Number System: Base-2, Bits, MSB and LSB

Convert a binary number to its decimal value using positional weights, and correctly identify the most- and least-significant bits of a binary word.

The binary number system is base-2, using only the digits 0 and 1 — called bits (binary digits) — and it is the number system every digital circuit physically operates in, because a bit maps directly onto a single two-level logic signal. Where decimal weights positions by powers of 10, binary weights positions by powers of 2. Fluency in reading binary positional weights directly, without always converting through decimal first, is a core practical skill for reading register values, memory addresses, and bit masks throughout digital design.

Bits, MSB, and LSB

Each digit in a binary number is called a bit, and it can only be 0 or 1. In a multi-bit binary number, the leftmost bit is called the Most Significant Bit (MSB) because it carries the largest positional weight (the highest power of 2), and the rightmost bit is called the Least Significant Bit (LSB) because it carries the smallest weight (2^0 = 1).

MSB and LSB terminology is used constantly in digital design — for example, when specifying which end of a register or bus a value is loaded into, or which bit toggles fastest in a binary counter (the LSB always toggles every count, while the MSB toggles only once per full cycle of the count).

Positional weights in binary

Exactly as in decimal, a binary number's value is the weighted sum of its bits, but with base 2 instead of base 10: each bit position i contributes bi x 2^i to the total. The weights for the first several positions, from LSB to MSB, are 1, 2, 4, 8, 16, 32, 64, 128, and so on, doubling at every position — a sequence worth memorizing since it recurs constantly in digital work.

Converting a binary number to decimal means summing 2^i for every position where the bit is 1, and ignoring positions where the bit is 0 (since 0 x 2^i contributes nothing). This is often faster in practice than mechanically multiplying every bit by its weight.

Binary positional-notation formula

The base is often written as a subscript (e.g., 101101_2, sometimes rendered as 101101(base 2)) to remove any ambiguity with a decimal number that happens to use only 0s and 1s. Positional weights double at every position moving left: 1, 2, 4, 8, 16, 32, 64, 128, ...

N = Sum(bi x 2^i)

where:
  bi = the bit at position i (0 or 1)
  i  = position, counted from 0 at the rightmost (LSB), increasing leftward toward the MSB

Example subscript notation:
  101101_2   -- the subscript 2 marks this as a base-2 (binary) number

Code Examples

Reading from the MSB (leftmost) to the LSB (rightmost), the bit positions have weights 32, 16, 8, 4, 2, 1. Summing only the weights where the bit is 1 (32, 8, 4, and 1) gives 45. Every position with a 0 bit contributes nothing to the sum.

1      0      1      1      0      1
 2^5    2^4    2^3    2^2    2^1    2^0
 32      0      8      4      0      1

101101_2 = 32 + 8 + 4 + 1 = 45_10

Bit positions from MSB to LSB

Six-bit binary word 101101, with each position's power-of-2 weight labeled from MSB to LSB.

MSB                          LSB
   1     0     1     1     0     1
  2^5   2^4   2^3   2^2   2^1   2^0
  32    16     8     4     2     1

  (MSB = most significant bit, carries the largest weight)
  (LSB = least significant bit, carries the smallest weight, 2^0 = 1)

Important Rules

N = Sum(bi x 2^i): binary value equals the sum of each bit times its positional power of 2.

MSB (most significant bit) is the leftmost bit, carrying the largest weight; LSB (least significant bit) is the rightmost bit, carrying weight 2^0 = 1.

Only bit positions equal to 1 contribute to the decimal sum; positions equal to 0 contribute nothing.

Positional weights double at each step moving from LSB toward MSB: 1, 2, 4, 8, 16, 32, ...

Where this shows up

Every register, memory address, and data bus in a digital system is fundamentally a binary number, and MSB/LSB terminology appears throughout datasheets, HDL code, and communication protocol specifications (e.g., 'MSB-first' vs 'LSB-first' serial transmission order, which determines the order bits are physically shifted out on a wire).

Reading 1000_2 as decimal 4, by miscounting the bit positions or their weights.

Assign weights correctly from the LSB: 1000_2 has a 1 only in the 2^3 position, so it equals 8, not 4.

1000_2 = 8_10, not 4. The common error is miscounting positions (treating the third bit from the right as 2^2=4 instead of correctly identifying the leftmost 1 as sitting in the 2^3 position), which produces exactly this kind of off-by-one-position mistake.

[tricky] What is the decimal value of 1000_2? A. 4 B. 8 C. 16 D. 1000

B. 8 — 1000_2 = 8_10, not 4. The single 1 bit sits in the 2^3 position (counting from 0 at the rightmost bit), and 2^3 = 8.

[multiple-choice] In an 8-bit binary number, which bit is the LSB and what weight does it carry? A. The leftmost bit, weight 128 B. The rightmost bit, weight 1 (2^0) C. The middle bit, weight 16 D. The leftmost bit, weight 1

B. The rightmost bit, weight 1 (2^0) — LSB stands for Least Significant Bit — the rightmost bit in a binary word, carrying the smallest positional weight, 2^0 = 1. The leftmost bit (MSB) carries the largest weight instead.

Convert the binary number 110110_2 to decimal, showing the weight of each bit position, and identify its MSB and LSB values.

110110_2 = 32 + 16 + 4 + 2 = 54_10. The MSB (leftmost bit) is 1 (weight 32); the LSB (rightmost bit) is 0 (weight 1).

List the weights from left to right as 32, 16, 8, 4, 2, 1 and sum only the positions with a 1 bit.