Thursday, October 14, 2010

The fate of two bits

Currently a bit represents two states OFF and ON state. We also call it as 0 and 1.

· 0

· 1

Similarly, through natural progression of numbers, a two bit number can represent a maximum of 4 numbers:

· 00 => 0

· 01 => 1

· 10 => 2

· 11 => 3

When we generalize, the number of symbols that can be represented through a ‘n’ bit binary is 2n.

For, 1 bit => 21 = 2, 2 symbols can be represented.

22 = 4 …

For a byte (8 bits), 28 = 256 unique symbols can be represented.

---

Now, what if a bit can represent more than two states? Say a bit can represent 3 states…

· 0

· 1

· 2

Then, two bits (each 3 states) can represent…

· 00 => 1

· 01 => 2

· 02 => 3

· 10 => 4

· 11 => 5

· 12 => 6

· 20 => 7

· 21 => 8

· 22 => 9

To generalize, n bits (each with m states) can represent (m)n symbols.

Practically, two bits can represent 4 symbols when a single bit can have two states… (Since our computers are designed to handle 2 states, we usually assume that a bit has only 2 states).

Like we have 64 bit computers, when would we have 64 mbit computers... Wonder how C programming would turn to look like! :)

0 comments: