Binary Numeral System - Representation

Representation

Any number can be represented by any sequence of bits (binary digits), which in turn may be represented by any mechanism capable of being in two mutually exclusive states. The following sequence of symbols could all be interpreted as the binary numeric value of 667:

1 0 1 0 0 1 1 0 1 1 | − | − − | | − | | x o x o o x x o x x y n y n n y y n y y

The numeric value represented in each case is dependent upon the value assigned to each symbol. In a computer, the numeric values may be represented by two different voltages; on a magnetic disk, magnetic polarities may be used. A "positive", "yes", or "on" state is not necessarily equivalent to the numerical value of one; it depends on the architecture in use.

In keeping with customary representation of numerals using Arabic numerals, binary numbers are commonly written using the symbols 0 and 1. When written, binary numerals are often subscripted, prefixed or suffixed in order to indicate their base, or radix. The following notations are equivalent:

100101 binary (explicit statement of format)
100101b (a suffix indicating binary format)
100101B (a suffix indicating binary format)
bin 100101 (a prefix indicating binary format)
1001012 (a subscript indicating base-2 (binary) notation)
%100101 (a prefix indicating binary format)
0b100101 (a prefix indicating binary format, common in programming languages)
6b100101 (a prefix indicating number of bits in binary format, common in programming languages)

When spoken, binary numerals are usually read digit-by-digit, in order to distinguish them from decimal numerals. For example, the binary numeral 100 is pronounced one zero zero, rather than one hundred, to make its binary nature explicit, and for purposes of correctness. Since the binary numeral 100 represents the value four, it would be confusing to refer to the numeral as one hundred (a word that represents a completely different value, or amount). Alternatively, the binary numeral 100 can be read out as "four" (the correct value), but this does not make its binary nature explicit.

Read more about this topic:  Binary Numeral System