Number Systems: Comprehensive Binary and Denary Guide
Fundamentals of Binary Representation
- Necessity of Conversion: Any form of data must be converted into a binary format so that it can be processed by a computer system.
- The Basic Building Block: Regardless of how complex a computer system is, the basic building block of all computers is the binary number system.
- System Rationale: The binary system is chosen because it consists only of s and s.
- Physical Representation (Switches): * Computers contain millions of tiny "switches." * These switches must be in an ON or OFF position. * A switch in the ON position is represented by the digit . * A switch in the OFF position is represented by the digit .
- Logic Gates: The switches used in a computer make use of logic gates to store and process data.
The Denary (Base 10) Number System
- Definition: Denary is the standard system used in everyday counting, which operates in multiples of .
- Digits: It uses ten separate digits, through , to represent all possible values.
- Base Type: It is known as a "base 10" number system.
- Column Headings (Place Values): The system uses powers of to determine column values: * = * = * = * = * =
- Example Representation: A number like is composed of the digits placed in their respective power-of-ten columns.
The Binary (Base 2) Number System
- Definition: The binary system is a "base 2" number system.
- Values: Only two digits, and , are used to represent all values.
- Column Headings (Place Values): Following the same logic as denary, the place values are powers of (, etc.).
- 8-Bit Binary Headings: A standard 8-bit binary number uses the following column values: * = * = * = * = * = * = * = * =
- Example Binary Number: .
Converting Binary to Denary
- The Conversion Process: Every time a appears in a binary column, the heading value of that column is added to a running total. If a appears, the value of that column is ignored.
- Example 1: 8-Bit Conversion * Binary: * Breakdown: * Calculation:
- Example 2: 12-Bit Conversion * Binary: * Column Headings: * Calculation:
Converting Denary to Binary
There are two primary methods for converting denary numbers into binary numbers.
Method 1: Successive Subtraction of Powers of 2
- Process: Subtract the largest possible power of from the denary number and place a in that corresponding binary column. Repeat the process with the remainder until the value reaches . Any column not used receives a .
- Example: Denary 142 1. (128 column gets a ) 2. (8 column gets a ) 3. (4 column gets a ) 4. (2 column gets a ) * Result:
- Example: Denary 59 1. (32 column gets a ) 2. (16 column gets a ) 3. (8 column gets a ) 4. (2 column gets a ) 5. (1 column gets a ) * Result: (Two s added to the left to complete the 8-bit format).
- Example: Denary 35,000 (16-Bit) 1. 2. 3. 4. 5. 6. * Result:
Method 2: Successive Division by 2
- Process: Divide the denary number by and record the remainder (even if it is ). Continue dividing the result by until the result is zero. Read the remainders in reverse order (bottom to top) to find the binary number.
- Example: Denary 142 * , remainder: * , remainder: * , remainder: * , remainder: * , remainder: * , remainder: * , remainder: * , remainder: * Reading bottom to top:
- Example: Denary 35,000 * , remainder: * , remainder: * , remainder: * , remainder: * , remainder: * , remainder: * , remainder: * , remainder: * , remainder: * , remainder: * , remainder: * , remainder: * , remainder: * , remainder: * , remainder: * , remainder: * Reading bottom to top:
Practice Activities and Problems
Activity 1.1: Binary to Denary Conversion List
Convert the following binary strings into their base 10 equivalents:
- a.
- b.
- c.
- d.
- e.
- f.
- g.
- h.
- i.
- j.
- k.
- l.
- m.
- n.
- o.
- p.
- q.
- r.
- s.
- t.
Activity 1.2: Denary to Binary Conversion List
Convert the following denary numbers into binary using both Method 1 and Method 2:
- a.
- b.
- c.
- d.
- e.
- f.
- g.
- h.
- i.
- j.
- k.
- l.
- m.
- n.
- o.