Vous êtes sur la page 1sur 19

DCAM Part 66 B 1.

1 Level 1
Module 5.2 - Numbering System
Numbering System : Binary, octal and
hexadecimal;
Demonstration of conversions between the
decimal and binary, octal and hexadecimal
systems and vice versa.

Level 1 :
A familiarisation with the principal element of
the subject.
Objectives: the applicant should be able to
give a simple description of the whole
subject, using common words and
examples.
The applicant should be able to use typical
terms.

5.2 Numbering
System

Introducti
on:
- knowledge of Numbering Systems is fundamental
to understanding
and
their or
operation
- computers
use to count
objects
perform mathematical
calculations
- Each is a set of symbols and characters referred
asPositional
digits.
Notation
- the
standard shorthand form writing numbers.
- The value of the particular digit depends on;
* the digit value.
* the position of the digit within the
e.g.
number.
3721 standard shorthand.
Three thousand seven hundred and twenty one
standard longhand.
The digit at far right Least Significant Digit (LSD).
The digit at far left Most Significant Digit (MSD).

Numbering
System
Base
- Has a base which is equal to the number of digits.
- A subscript is added to a number to indicate its
base.
e.g.
The
of largest
digit of a101
numbering
1012value
- indicates
the number
is a basesystem
of 2 or is:
binary- number.
One less than the base
The value of smallest digit of a numbering system
is:
Each digit
is multiplied by the base raised to the
- Zero
appropriate power for the digit
10 position.
10
10
10
3
7
2
1
e.g. decimal No. 3721 is
thousan hundre
tens
units
equal to:
3

ds

ds

(3 X 103) + (7 X 102) + (2 X 101) +


(1 X 100)
3000
+ 700
+
20
+

Binary Number
System

- a simplest number system employing positional


number.
- has a base of 2.
-IN
two
binary digits
(BITS) used are 0 and 1.
A DIGITAL
COMPUTER:
Only two distinct states.
All inputs to a digital computer must be converted
to a series of 1s and 0s (binary) before the
computer
can
make
use to
of decimal
the data.is straight
Conversion
from
binary
forward and easily performed using positional
notation.
EXAMPLE: 1.
Positional
2
2
2
2
2
2
2
2
Weight Value
notation
7

128

64

32

16

Base 10 Value

Binary Number to be
Converted

Equivalent base 10 Number

16

16 + 4 + 2 + 1
=23

Binary Number
System

In example 2, a binary number representing a


fraction is shown.
Add together the base 10 values for each bit
position
containing
EXAMPLE: a2.1
Positional
2
2
2
2
2
notation
3

-1

2-2

2-3

2-4

Weight Value
Base 10 Value

0.5

0.2
5

0.1
3

0.0
6

0.5

0.1
3

Binary Number to be
Converted
Equivalent base 10
Number

0.0
8 + 4 + 0.5 + 0.125
+ 0.0625
6
= 12.687510

Decimal Number
System

- has a base of 10.


- Most familiar, used for everyday counting.
- mathematical calculations.
- contains ten digits from 0 to 9, with 9 the largest
digit.
DECIMAL DIGITS
9

POSITION NOTATION
105

104

103

102

101

100

10-1

10-2

Weight Value

Number

Decimal point

600000 + 500000 + 8000 + 900 + 10 + 2 + 3/10 + 3/100


658912.3310

Decimal to Binary
Conversion
- to repeatedly divide the decimal by the base
number.
- by keeping track of the remainders.
- The new numbering base equivalent is obtained.
Case of DECIMAL to BINARY conversions,
- The decimal number is divided by the base
number 2.
- The first remainder obtained is the least
significant digit (LSD).
- The last remainder is the most significant digit
(MSD).

Decimal to Binary
Conversion

Octal Number
System

- has a base of 8
- the weight value of each BIT position (80, 81,
82..) and
theconvert
base 104522
equivalent
are
To
(base 8)
to shown.
base 10, multiply
EACH total octal digit by its corresponding base 10
value, then add together the computed base 10
values.
8
8
8
8
8
Weight Value
4

4,09
6

512

64

Base 10 Value

Octal Number to be
Converted

Equivalent base 10
238610 Number

2,04 320
16
20488 + 320 +

16 + 2 =

45228 =

238610

Decimal to Octal
Conversion
Decimal to Octal
conversions can also
be accomplished by
successive division.
The decimal number
is repeatedly divided
by base 8 and again
the remainders are
used for decimal to
octal equivalent
number.

Binary to Octal
Conversion
- three-bit

position represent eight combinations


(000 thru 111).
- octal no. can be substituted for a 3-bit binary
numbers.
- binary no. separated into groups of 3-bits from
right (LSD) to
(MSD) at the left.
- Each group of 3-bits is replaced by an octal
equivalent.
- Octal to binary is the reverse procedure.

HEXADECIMAL NUMBER
SYSTEM
- another

system often used in microcomputers.


- has base 16 which requires 16 digits.
- Digits used are 0 through 9 and A through F.
- A thru F - equivalent decimal numbers of 10 thru 15 resp
HEXADECIMAL DIGITS
F

15

14

13

12

11

10

- This

system is called alphanumeric number system


since numbers
and letters are used to represent the digits.

HEXADECIMAL NUMBER
SYSTEM
- Refer positional notation and convert A8F5 (base
16) to base 10
equivalent shown.
- Often hexadecimal numbers are written with an H
following the
hexadecimal number.
163

162

161

160

Weight Value

4,096

256

16

Base 10 Value

Hexadecimal Number to be Converted

40,960

2,048

240

Equivalent base 10 Number

40,960 + 2,048 + 240 + 5 = 4325310


A8F516 = 4325310

HEXADECIMAL
CONVERSION
- decimal to
Hexadecimal
conversion can be
done by successive
division.
- the decimal
number is divided
by base number
16.
- if the remainder
is greater than 9, it
should be changed
to the hexadecimal
equivalent of the
remainder.

HEXADECIMAL
CONVERSION
e.g., if the remainder
is 10
it should be changed
to A,
if the remainder
is 11
it should be changed
to B
and so on,
up to 15 which is
F.

BINARY TO HEXADECIMAL
CONVERSION

- used as a shorthand notation for binary

numbers.
- in binary, 4-bit positions are necessary to
obtain
16 combination numbers (0000 thru 1111).
- the binary numbers is separated into groups of
four beginning
at LSD and preceding to the left.
- Each group of four bits is replaced by
hexadecimal equivalent.

BINARY TO HEXADECIMAL
CONVERSION
In forming the 4 - bit grouping,
0s may be required to complete the first (MSD)
group.

BINARY CODED DECIMAL NUMBER


SYSTEM
A method of representing decimal numbers in
digital computers is known as Binary Coded
23Decimal
22 21 20 (BCD).
23 22 21 20 23 22 21 20
WEIGHT VALUE
0

BCD

102

101

100

BCD
8

DECIMAL

TO

BCD

1001

0100

0110

DECIMAL
7

TO
3

DECIMAL
WEIGHT VALUE

10

0111

0011

1000

6
10

Vous aimerez peut-être aussi