You are on page 1of 16

# Number

Systems

Number Systems
Stone Age: some stone marks
Roman Empire: more systematic notation I,
II, III, IV, V, VI, VII.VIII, IX, X, C=100,
D=500, M=1000, L=50
Concept of zero by
Maya- I century, Hindu-V century

Positional-value systems:
decimal, binary, octal, etc..

Number Systems
Four number systems

## Decimal (10 elements)

Binary (2 elements)
Octal
(8 elements)

## The Base Number is equal to the elements (symbols)

for the number system.

Positional-Value System
The value of a digit (digit from Latin
word for finger) depends on its position.
Positional values
2 1 0
(weights)
10 10 10

5 6 7
MSD
We will write ( 5 6 7)

LSD

## Binary Numbers System

Computers work only on two states
On
Off

Zero / One

## Thus a number system with two elements

{0,1} and then the base number = 2
A binary digit bit

## Binary Numbers System

5 4 3 2 1 0
2 2 2 2 2 2

1 0 1 1 1 1
MSB
Most Significant Bit

LSB
Least Significant Bit
We write: ( 1 0 1 1 1 1)2

## In Binary system the Base number = 2

and digits are called bits

## The Growth of Binary Numbers

n

2n

2n

20=1

28=256

21=2

29=512

22=4

3
4
5
6

2 =8
24=16
25=32
26=64

27=128

10 210=1024

kilo

11 211=2048
12 212=4096
20

220=1M

30
40

230=1G
240=1T

Mega
Giga
Tera

Binary Representation
The basis of all digital data is binary representation.
Binary - means two

1, 0
True, False
Hot, Cold
On, Off

We must be able to handle more than just values for real world
problems
1, 0, 56
True, False, Maybe
Hot, Cold, Warm

Number Systems
number systems
The decimal number system (base 10) you should be
familiar with!
A digit in base 10 ranges from 0 to 9.
A digit in base 2 ranges from 0 to 1 (binary number
system). A digit in base 2 is also called a bit.
A digit in base R can range from 0 to R-1
A digit in Base 16 can range from 0 to 16-1
(0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F). Use letters A-F to
represent values 10 to 15. Base 16 is also called

## Positional Number Systems

system is called a
positional number system.
A number is represented
as a string of digits.
Each digit position has a
weight assoc. with it.
Numbers value = a
weighted sum of the digits

## Any number can be

represented in any
base by the simple
sum of each digit's
value, positional
notation:

d * basei

## Positional Notation more examples

Value of number is determined by multiplying each digit by a
weight and then summing. The weight of each digit is a
POWER of the BASE and is determined by position.
( 953 )10 = 9 * 102 + 5 * 101 + 3 * 100
= 900 + 50 + 3 = 953

decimal

= 8 + 0 + 2 + 1
= 11

binary

## ( A2F )16 = 10*162 + 2*161 + 15*160

= 10 * 256
+ 2 * 16 + 15 * 1
= 2560 + 32 + 15 = 2607

hex

## Decimal Number Systems

The Decimal number system with ten elements
{0,1,2,3,4,5,6,7,8,9} and then the base number = 10

## (1439 )10 = 1 * 103 + 4 * 102 + 3 * 101 + 9 * 100

Thousands

Base = 10

Hundreds

Tens

Ones

Binary

Decimal

(1101)2 = 1 * 23 + 1 * 22 + 0 * 21 + 1 * 20
=1*8+1*4+0*2+1*1
=8+4+0+1
(1101)2 = (13)10
1, 2, 4, 8, 16, 32, 64, 128, 256, 512, .

## Converting from Decimal to Another Base

For each digit position:

## 1. Divide the decimal number by the base

(e.g. 2)
2. The remainder is the lowest-order digit
3. Repeat the first two steps until no divisor
remains.
4. For binary the even number has no
remainder 0, while the odd has 1

Decimal
2
2
2
2

13
6
3
1
0

Binary
1
0
1
1

LSB

MSB

(13)10 = (1101)2

Decimal

Binary

## An example to convert (37)10 to binary:

37 / 2 = 18 remainder 1
18 / 2 = 9
remainder 0
9 / 2=4
remainder 1
4 / 2=2
remainder 0
2 / 2 = 1 remainder 0
1 / 2=0
remainder 1

(100101)2