You are on page 1of 30

INTRODUCTION TO

DIGITAL SYSTEM
NUMBER SYSTEM
Number System

Number system is a way or methodology on how numbers are


represented inside the computer’s memory. Human beings
think in decimal, while computers process in binary.
Technically, computer can accept data in human readable form
then convert them into acceptable computer code to generate
an output which can be understood by man.
Number System

There are two (2) important concepts involved when


studying number systems, these are:
 
1. That all number systems follow the concept of positional
notation. This means that the numerical value given to a
digit is determined by its relative position in a given
number.

2. That all number systems follow a set of valid values.


 
Numeral System Base (N) Valid Values
1. Binary 2 0,1
2. Decimal 10 0-9
3. Octal 8 0-7
4. Hexadecimal 16 0-9,A,B,C,D,E,F

Note: A=10, B=11, C=12, D=13, E=14, F=15


Binary
binary
The Binary Number Base Systems
Most modern computer systems (including the IBM PC) operate
using binary logic. The computer represents values using two
voltage levels (usually 0V for logic 0 and either +3.3 V or +5V for
logic 1). With two levels we can represent exactly two different
values. These could be any two different values, but by convention
we use the values zero and one. These two values, coincidentally,
correspond to the two digits used by the binary number system.
Octal
octal
The Octal Number Base System
Although this was once a popular number base, especially in
the Digital Equipment Corporation PDP/8 and other old
computer systems, it is rarely used today. The Octal system is
based on the binary system with a 3-bit boundary. The Octal
Number System:
 uses base 8
 includes only the digits 0 through 7 (any other digit would
make the number an invalid octal number)
Decimal
decimal

The Decimal Number Base Systems


The Decimal Number System uses base 10. It includes the
digits from 0 through 9. For example, the number 123 is in
decimal. This is the sum of 100 + 20 + 3, wherein the place
values of each number determine the numerical value of a
number.
Hexadecimal
hexadecimal

The Hexadecimal system is based on the binary system using a


Nibble or 4-bit boundary. In Assembly Language programming, most
assemblers require the first digit of a hexadecimal number to be 0, and
we place an H at the end of the number to denote the number base.
The Hexadecimal Number System:
 uses base 16
 includes only the digits 0 through 9 and the letters A, B, C, D, E,
and F
NUMBER BASE
CONVERSION
Our decimal number system is known as a positional
number system, because the value of the number depends on
the position of the digits. For example, the number 123 has a
very different value than the number 321, although the same
digits are used in both numbers.

NUMBER BASE
CONVERSION
1. Converting from decimal to other number bases

In order to convert a decimal number into its representation in a


different number base, we have to repeatedly divide the decimal
number by the base in which it is to be converted, until the quotient
becomes zero. As the number is divided, the remainders in reverse
order form the digits of the number in the other base.

NUMBER BASE
CONVERSION
Example 1: Convert the decimal number 82 to base
6:

82/6 = 13 remainder 4
13/6 = 2 remainder 1
2/6 = 0 remainder 2

The answer is formed by taking the remainders in reverse order:  2 1


4 base 6

NUMBER BASE
CONVERSION
Example 2: Convert decimal 29 to binary.

NUMBER BASE
CONVERSION
Example 3: Convert decimal 942 to octal.

NUMBER BASE
CONVERSION
Example 4: Convert decimal 2598 to hexadecimal.

NUMBER BASE
CONVERSION
Method 2. Positional Value Method (PVM)
Conversion from Binary Number to Decimal number
(Base 2 to Base 10)

Example: 1012-N10

1012          
  1 * 20 = 1
  0 * 21 = 0
  1 * 22 = 4
          510

Positional Value Method


Conversion from Octal Number to Decimal number
(Base 8 to Base 10)
Example: 1758 - N10

1758          
  5 * 80 = 1
  7 * 81 = 56
  1 * 82 = 64
          12510

Positional Value Method


Conversion from Hexadecimal Number to Decimal number
(Base 16 to Base 10)
Example: 3AE16 - N10

3AE16          
  E * 160 = 14
  A * 161 = 160
  3 * 162 = 768
          94210

Positional Value Method


Method 3. Converting from Binary to Octal and Hexadecimal
A. Binary Number to Octal Number
 
Rules:
1. Begin at the binary point (rightmost digit) and block
off groups of three binary digits.

2. Replace each group of three binary digits with its


equivalent octal digit. The digit will range from 0 – 7.
 

Binary to Octal and


Hexadecimal
 
A.Binary Number to Octal Number
 
Example 3-1: Convert 1101011 in binary to Octal number
 
11010112 – N8
421 421 421
001/101/011
1 5 3
 
Therefore, 11010112 is 1538  

Binary to Octal and


Hexadecimal
B. Binary Number to Hexadecimal Number

 
Rules:
1. Begin at the binary point (rightmost digit) and block off
groups of four binary digits.
2. Replace each group of three binary digits with its equivalent
hexadecimal digit. The digit will range from 0 – 15.

Binary to Octal and


Hexadecimal
B. Binary Number to Hexadecimal Number

 
Example 3-2: Convert 11101011 in binary to hexadecimal number
 
111010112 – N16
8421 8421
1110/1011
14 11
 
Therefore, 111010112 is EB16

Binary to Octal and


Hexadecimal
Method 4. Converting from Octal and Hexadecimal to Binary
Rules:
 
Replace each Octal digit with the equivalent three binary digit/ each
Hexadecimal digit with the equivalent four binary digit.

Octal and Hexadecimal to


Binary
Method 4. Converting from Octal and Hexadecimal to Binary
Examples 4-1: Convert 264 in octal to binary number
 
2648 to Base 2

2 6 4
010 110 100
 
Answer 101101002

Binary to Octal and


Hexadecimal
Method 4. Converting from Octal and Hexadecimal to Binary

Examples 4-2: Convert hexadecimal 9AD to binary.


 
9AD16 to Base 2
 
9 A D
1001 1010 1101
 
Answer 1001101011012

Octal and Hexadecimal to


Binary

You might also like