Sie sind auf Seite 1von 14

TDB 1123 COMPUTER

ORGANISATION
Number System

Topics to be covered
Introduction to Number System
The Decimal Number System
The Binary, Hexadecimal and Octal
Number Systems

Introduction to Number
System
We generally count and perform arithmetic using
the decimal number or base 10, number system.
The base of number system is simply the number
of different digits, including zero, that exist in the
number system.
Computer perform all their operation using the
binary, or base 2, number system - all code and
data stored and manipulated in binary form and
calculations are performed using binary arithmetic
(0 and 1)
Each digit in a binary number commonly stored and
manipulated in groups of 8 bits (know as byte),
16bits (halfword), 32 bits ( a word) or 64 bits (a
double word)

Introduction to Number
System
Long, Long ago

The Decimal Number


System
The Decimal Number system is the Arabic
number system of counting or base 10
number system of counting
Basically the decimal number 235 can be
represented as follows:
Number 235 (in decimal system) = 235 (10)
= 2 groups of (10x10 units) + 3 groups of (10
units) +
5 individual unit
or 2 * (100) + 3 * (10) + 5 * (1)
or 2 * (102) + 3 * (101) + 5 * (100)

The Decimal Number


System
Example:
Number
1034.56(10)

= 1034.56 (in decimal system) =

= 1 x (1000) +
0 x (100) + 0 x
3 x (10) + 3 x
4 x (1) +
4x
5 x (0.1) + 5 x
6 x (0.01) + 6 x

=
1 x (103)
(102)
(101)
(100)
(10-1)
(10-2)

The Decimal Number


System
General format of decimal integer numbers:
A decimal integer number N (base 10 number) that
has k-digits can be symbolically written as:
N = dk-1dk-2dk-3.d1d0
N = dk-1x(10k-1) + dk-2x(10k-2) + d1x(101) + d0 x (100)

Where any decimal digit can only be one of:


0,1,2,3,4,5,6,7,8,9.
And where:
dk-1 is the Most Significant Digit (MSD) and
d0 is the Least Significant Digit (LSD)

The Binary Number System


General format of binary integer numbers:
A binary integer number N (base 2 number) that
has k-digits can be symbolically written as:
N = dk-1dk-2dk-3.d1d0
N = dk-1x(2k-1) + dk-2x(2k-2) + d1x(21) + d0 x (20)

Where any decimal digit can only be one of: 0,1.


And where:
dk-1 is the Most Significant Digit (MSD) and
d0 is the Least Significant Digit (LSD)

The Binary Number System


Example
N = 11101(2) (N has five digits which means k = 5);
N = d4 d3 d2 d1 d0
(Where d4 = 1, d3 = 1, d2= 1, d1 = 0, d0 = 1)
N = d4 x (24) + d3 x (23) + d2 x (22) + d1 x (21) + d0 x
(20)
N = 1 x (24) + 1 x (23) + 1 x (22) + 0 x (21) + 1 x (20)
N = 16 + 8 +4 +0 + 1 = 29(10)

The Binary Number System


Example
Number
10101 (2)
= 1 x (24)
0 x (23)
1 x (22)
0 x (21)
1 x (20)
= 21(10)

10101 (in Binary System) =

The Hexadecimal Number


System
General format of hexadecimal integer numbers:
A hexadecimal integer number N (base 16 number)
that has k-digits can be symbolically written as:
N = dk-1dk-2dk-3.d1d0
N = dk-1x(16k-1) + dk-2x(16k-2) + d1x(161) + d0 x (160)
Where any decimal digit can only be one of:
0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F.
And where:
dk-1 is the Most Significant Digit (MSD) and
d0 is the Least Significant Digit (LSD)

The Hexadecimal Number


System
Example:
N = 1AC01F(16) (N has six digits which means k = 6);
N = d 5 d4 d3 d2 d1 d0
(Where d5 = 1, d4 = A, d3 = C, d2= 0, d1 = 1, d0 = F)
N = d5 x 165 + d4 x 164 + d3 x 163 + d2 x 162 + d1 x 161 + d0 x 160
N = 1 x (165) + A x (164) + C x (163) + 0 x (162) + 1 x (161) + F x
(160)
N = 1753119(10)

The Octal Number System


General format of octal integer numbers:
A octal integer number N (base 8 number) that has kdigits can be symbolically written as:
N = dk-1dk-2dk-3.d1d0
N = dk-1x(8k-1) + dk-2x(8k-2) + d1x(81) + d0 x (80)

Where any decimal digit can only be one of:


0,1,2,3,4,5,6,7.
And where:
dk-1 is the Most Significant Digit (MSD) and
d0 is the Least Significant Digit (LSD)

The Octal Number System


Example:
N = 15603

(8)

(N has five digits which means k = 5):

N = d4 d3 d2d1d0
(Where d4 = 1, d3 = 5, d2 = 6, d1 = 0, d0 = 3)
N = d4 x (84 )+ d3 x (83 )+ d2 x (82 )+ d1 x (81) + d0 x
(80)
N = 1 x (84 )+ 5 x (83 )+ 6 x (82 )+ 0 x (81) +3 x (80)
N = 1x4096 + 5 x 512 + 6 x64 + 0 + 3 = 7043(10)

Das könnte Ihnen auch gefallen