CFP 6.1 Number System

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 15

Number Base System

How a computer represents and stores


information?
Computer machine expressed information to the following:
 
Binary means having only two possible states.
Binary system is based on reducing information, whether
the information is a number, letter, symbol, picture, or
sound into sequence of bits – short for binary digits.
Byte is an 8 bits strung together to represent one
character of information
Binary numbering system 0 and 1 digits
How the CPU process data?

The representation of data begins with digitizing it


into binary digits. The processing of information
begins with breaking down each instruction
contained in a program into binary-based
machine language instruction – a binary based
program instruction that corresponds directly to
and activates a particular set of circuits in the CPU
Number System
The decimal system is a positional system based 10
integers. Any value can be represented by a number system of
any base (binary is one of those).

1. Decimal: base = 10 digits are: 9,8,7,6,5,4,3,2,1,0

Positional value: ……… 104 103 102 101 100


……… 10000 1000 100 10 1

2. Binary: base = 2 digits are: 1,0

Positional value: 28 27 26 25 24 23 22 21 20
256 128 64 32 16 8 4 2 1
3. Octal: base = 8 digits are: 7,6,5,4,3,2,1,0

4. Hexadecimal: base = 16 digits are: F,E,D,C,B,A,9,8,7,6,5,4,3,2,1,0


Conversion

1. Decimal – Binary conversion


 
To convert decimal whole numbers from base 10 to
any other base, divide that number repeatedly by the
value of the base to which the number is being converted.
The division operation is repeatedly until the quotient is
zero. The remainders – written in reverse of the order in
which they were obtained, from the new equivalent
numeral.
2. Binary – Decimal conversion
 
Binary numerals can be converted to decimal by the use of expanded
notation. The position values of the original numeral are written out.

Example:
 
1012 = 1x22 + 0x21 + 1x20
=4+0+1
=5
3. Decimal – Octal conversion
 
When converting from decimal to octal, we divide the decimal number
by eight and note the remainders after each division.

Example:
Divisions Quotients Remainders
18/8 2 2
2/8 0 2

Therefore:
1810 = 228
4. Octal – Decimal conversion
 
To convert from octal to decimal, multiply each octal digit by its
positional value and add the resulting products.

Example:
 
258 = 2x81 + 5x80
= 16 + 5
= 2110
5. Octal – Binary conversion
 
The use of octal numbers lies in octal-binary conversions. The
relationship between octal numbers and binary numbers is given in Table.
With this tabulation, any octal number (up to 7) may be converted to its
binary equivalent. Each octal digit is converted one at a time to its binary
equivalent.
Binary 000 001 010 011 100 101 110 111
number
Octal 0 1 2 3 4 5 6 7
Number

Example:
458 = (?)2
Since 48 = 1002 and
58 = 1012 Therefore:
458 = 1002 1012
6. Binary – Octal conversion
 
Group the bits in threes, starting at the binary point,
working both ways, then converting each group of three to its
octal equivalent. Zeroes are added to each end to make
complete group.

Example:

101101112 = 010 110 1112


or 2678
7. Decimal – Hexadecimal conversion
 
A direct conversion, known as the remainder method, is
also possible. Note that the remainders greater than 9 have
to be changed to its equivalent hexadecimal digit.
Example:
Divisions Quotients Remainders
58/16 3 10 (or A)
3/16 0 3

Therefore:
5810 = 3A16
8. Hexadecimal – Decimal conversion
To convert from any numbering system to the decimal system;
multiply each digit by its positional value and then obtain the sum. Note
convert hexadecimal digits to their equivalent counterpart.
Decimal Number Hexadecimal Number
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 A
11 B
12 C
13 D
14 E
15 F
Example:
4B616 = 4x162 + 11x161 + 6x160
= 1024 + 176 + 6
= 120610
9. Hexadecimal – Binary conversion
 
The conversion from hexadecimal to binary is a simple procedure and
easily done by replacing each hexadecimal digit by its 4-bit equivalent.

Example:
2C8516 = 101100100001012

Since:

216 = 00102 816 = 10002 C16 = 11002 516 = 01012


10. Binary – Hexadecimal conversion
 
When converting binary to hexadecimal equivalents, the binary
number is first partitioned into 4-bit sequences, beginning on the right, and
then replaced by its hexadecimal equivalent. Zeroes may be added to make
the number of digits a multiple of four.
Binary 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111
number

Hexadecima 0 1 2 3 4 5 6 7 8 9 A B C D E F
l Number

Example:
1011101100100112 = 0101 1101 1001 00112

or 5D9316

You might also like