# BINARY SYSTEM

DEFINITION: The binary number system is a positional number system used by computers to manipulate, represent, and interpret data. Data comes in several forms: numbers, letters/symbols, and even images. The computer only understands bits, so data familiar to humans must be translated into bits. There are eight (8) bits to one (1) byte. It takes one byte to represent a character as seen in the ASCII character set.

Don't use plagiarized sources. Get Your Custom Essay on
BINARY SYSTEM
Just from \$13/Page

In example 1 below are eight (8) positions. Each position can store either a zero (0) or a one (1), i.e., each position can hold a 1-bit or a 0-bit, hence two different bits, hence binary is called the base 2 number system. To determine which bit it is, each bit is assigned a position number from 0 through 7 ordered right to left. Since position 0 can hold one of two different bit types then the possible combination for that position is 20. Since position 1 can hold one of two different bit types the possible combination for that position in conjunction with position 0 is 21, etc.

Example 1:

1 possible combinations for 20 = 1

1 0

1 1 possible combinations for 21 = 2

1 0 0

1 0 1

1 1 0 possible combinations for 22 = 4

1 1 1

_ _ _ _ _ _ _ _

27 26 25 24 23 22 21 20

USAGE: The 1-bit is the on-bit. Every position that has a 1-bit gets interpreted to its decimal form so that all the bits are translated into a number of the base 10 number system that is familiar to humans. Therefore each binary value has its decimal counterpart. Each decimal counterpart is assigned a character which is either a letter or special symbol. Consequently the computer will know which letter or symbol it is dealing with in the form of one (1) byte.

Example 2: Below is a representation of the capital letter “J”. As this letter is typed, the typist sees the capital letter “J”, but the computer sees the string of 1s below.

0 1 0 0 1 0 1 0

27 26 25 24 23 22 21 20

64 8 2 = 74

(decimal number)

assigned to capital letter “J”

The above byte represents a character that is non-numeric. A character that looks like a number may not be a mathematical number even if it has a binary value assigned to it.

Example 3: The digit “2” is the 51st character listed in the ASCII character set.

0 0 1 1 0 0 1 0

27 26 25 24 23 22 21 20

32 16 2 = 50

(decimal number)

assigned to the

non-numeric “2”

The computer knows whether a character is numeric or non-numeric based on how it is told to treat the character through what are called data types. Think about the cells in a spreadsheet package such as Microsoft Excel. Cells that are used in calculations are typed as numbers and those that are not are typed as text. Similarly in programming a variable (sometimes referred to as a field or identifier) is given a data type, so that whatever is stored in the variable has to match the data type for the variable. A variable that is typed as a character can only store a single character such as a letter or symbol. A variable typed as an integer can store numbers but only whole numbers. A variable typed as a double can store numbers such as real numbers or ones able to hold fractions. A variable typed as a String can store more than one character. Therefore, if a variable is typed as a character and it stores 3, then the binary value is 00110011 (or the decimal number 51). But what if the variable is typed as an integer? It will have to store the 3 as a real number.

Example 4: The binary value for a numeric 3 stores a 1-bit in the positions that will translate it into a decimal 3.

0 0 0 0 0 0 1 1

27 26 25 24 23 22 21 20

2 1 = 3 (decimal number)