Title: Numbering Systems
1Numbering Systems Computing
- Understanding Binary, Octal and Hexadecimal
Numbering Systems
2What is a computer?
- Universal Information Manipulator
- Information data
3 Data
- 2 ways to manipulate an store
- Analog
- Digital
4Analog
- Continuous
- Infinite precision
- Limited accuracy
5Digital
- Incremental (series of numbers)
- Limited precision
- High accuracy
6Analog vs digital
7Computers understand voltage
1
1
0
8Why Binary?
- Computers are made of a series of switches
- Each switch has two states ON or OFF
- Each state can be represented by a number
- ON is represented by 1
- Off is represented by 0
9Understanding Placeholders
- Each numbering system has placeholders
- The possible values of each place holder depends
on the maximum number of single-digit numbers
available for that numbering system - In the Base-10 world (aka Decimal), there are ten
possible digits that each placeholder can take
(0-9)
Think of placeholders like an odometer in a car
10Understanding Placeholders
Base-10 (Decimal)
Ones
Tens
Placeholder Name
Hundreds
1004
103
16
Value
Exponential Expression
1024
1013
1006
11Understanding Placeholders
Base-2 (Binary)
Ones
Twos
Placeholder Name
Fours
41
20
11
n10 Value
n10 Exponential Expression
221
210
201
12Converting Base-2 to Base-10
ON
OFF
ON
ON/OFF
OFF
ON
n10 Exponent
20
21
22
23
24
0
0
2
1
16
Calculation
1910
13Converting Base-10 to Base-2 21
Consecutive Division
- Step 1
- Q R
- 21 / 2 10 1
- 10 / 2 5 0
- / 2 2 1
- / 2 1 0
- 1 / 2 0 1
14Converting Base-10 to Base-2
2110
- STEP TWO Concatenate remainders beginning from
the bottom up. - Q R 10101
- 21 / 2 10 1
- 10 / 2 5 0
- / 2 2 1
- / 2 1 0
- 1 / 2 0 1
15Converting Base-10 to Base-2
2110
101012
RESULT
16Introducing Octal
- Computer scientists are often looking for
shortcuts to do things - One of the ways in which we can represent binary
numbers is to use their octal equivalents instead - This is especially helpful when we have to do
fairly complicated tasks using numbers
17Introducing Octal
- The octal numbering system includes eight base
digits (0-7) - After 7, the next placeholder to the right begins
with a 1
18Octal Placeholders
Base-8 (Octal)
Ones
Placeholder Name
Eights
Sixty-Fours
642
84
11
n10 Value
n10 Exponential Expression
822
814
801
19Converting Base-2 to Base-8
100011001010012
STEP ONE Take the binary number and from right
to left, group all placeholders in triplets. Add
leading zeros, if necessary
010
001
101
100
001
20Converting Base-2 to Base-8
100011001010012
214518
STEP TWO Convert each triplet to its
single-digit octal equivalent. (HINT For each
triplet, the octal conversion is the same as
converting to a decimal number)
010
001
101
100
001
2
1
1
5
4
21Converting Base-10 to Base-8
483210
STEP ONE Divide the Base-10 number by eight.
DO NOT DIVIDE PAST THE DECIMAL POINT INSTEAD
INCLUDE A REMAINDER
604
r0
4832 / 8
22Converting Base-10 to Base-8
483210
STEP TWO Divide the quotient of the previous
expression by eight. Again, do not divide past
the remainder. Repeat the process until you have
a quotient of 0
604
r0
4832 / 8
75
r4
604 / 8
9
r3
75 / 8
1
r1
9 / 8
0
r1
1 / 8
23Converting Base-10 to Base-8
483210
113408
STEP THREE Look at the column of remainders.
Reading from bottom to top, you will see the
octal equivalent
604
r0
4832 / 8
75
r4
604 / 8
9
r3
75 / 8
1
r1
9 / 8
0
r1
1 / 8
24Hexadecimal Numbering
- Sometimes, it is necessary to use a numbering
system that has more than ten base digits - One such numbering system, hexadecimal, is useful
on the Web - Hexadecimal number, a Base-16 numbering system,
is used in specifying web colors
25Hexadecimal Numbering
- Because the Base-16 numbering system uses more
than 10 base digits, we need to adopt new symbols
for the Base-16 equivalents of the Base-10
numbers 10, 11, 12, 14 and 15. We use letters to
do this
26Converting Base-10 to Base-16
21410
STEP ONE Divide the Base-10 number by sixteen.
DO NOT DIVIDE PAST THE DECIMAL POINT INSTEAD
INCLUDE A REMAINDER
13
r6
214 / 16
27Converting Base-10 to Base-16
21410
STEP TWO Convert both the quotient and the
remainder to their hexadecimal equivalents
13
r6
214 / 16
D
6
Hex Equivalents
28Converting Base-10 to Base-16
21410
D616
STEP THREE The quotient represents the first
digit of the hexadecimal equivalent and the
remainder represents the second digit
13
r6
214 / 16
D
6
Hex Equivalents
29Questions?