Micro Processor A.2
Micro Processor A.2
MICRO-
PROCESSOR
BSCPE-3A
AERON L. ALMOSARA
WHAT IS NUMBER
REPRESENTATION
SYSTEM?
A number representation system, also known as a
numeral system, is a system of representing
numbers using symbols or digits. Different number
representation systems are used in different parts
of the world and in different fields of study, such
as mathematics, computer science, and
engineering.
The most commonly used number representation
system is the decimal system, which uses ten digits
(0, 1, 2, 3, 4, 5, 6, 7, 8, 9) to represent all numbers.
Other number representation systems include
binary (base 2), octal (base 8), hexadecimal (base
16), and Roman numerals.
Each digit in a number representation system has
a positional value based on its position within the
number. For example, in the decimal system, the
digit in the ones place has a value of 1, the digit in
the tens place has a value of 10, the digit in the
hundreds place has a value of 100, and so on.
HOW TO CONVERT THE
FOLLOWING:
b. Decimal to Octal:
Divide the decimal number by 8 and write
down the remainder (0 to 7).
Divide the quotient by 8 and write down the
remainder.
Repeat the process until the quotient becomes
0.
Write the remainders in reverse order to get
the octal equivalent.
Example: Convert decimal number 134 to octal.
134 divided by 8 = 16 remainder 6
16 divided by 8 = 2 remainder 0
2 divided by 8 = 0 remainder 2
The octal equivalent of 134 is 206.
HOW TO CONVERT THE
FOLLOWING:
c. Decimal to Hexadecimal:
Divide the decimal number by 16 and write
down the remainder (0 to 9 and A to F for
values 10 to 15).
Divide the quotient by 16 and write down the
remainder.
Repeat the process until the quotient becomes
0.
Write the remainders in reverse order to get
the hexadecimal equivalent.
Example: Convert decimal number 443 to
hexadecimal.
443 divided by 16 = 27 remainder 11 (B in
hexadecimal)
27 divided by 16 = 1 remainder 11 (B in
hexadecimal)
1 divided by 16 = 0 remainder 1
The hexadecimal equivalent of 443 is 1BB.
HOW TO CONVERT THE
FOLLOWING:
d. Binary to Decimal:
Write down the binary number.
Multiply each digit by the corresponding power
of 2 (from right to left starting with 2^0).
Add the products to get the decimal
equivalent.
Example: Convert binary number 11011 to decimal.
1 x 2^4 + 1 x 2^3 + 0 x 2^2 + 1 x 2^1 + 1 x 2^0 =
16 + 8 + 0 + 2 + 1 = 27.
e. Binary to Octal:
Divide the binary number into groups of three
digits (starting from the right) and write down
the equivalent octal digit for each group.
If the leftmost group has fewer than three
digits, add zeros to the left to make it a three-
digit group.
Example: Convert binary number 11011 to octal.
011 011 -> 33 in octal.
The octal equivalent of 11011 is 33.
HOW TO CONVERT THE
FOLLOWING:
f. Binary to Hexadecimal:
Divide the binary number into groups of four
digits (starting from the right) and write down
the equivalent hexadecimal digit for each
group.
If the leftmost group has fewer than four
digits, add zeros to the left to make it a four-
digit group.
Example: Convert binary number 11011 to
hexadecimal.
0001 1011 -> 1B in hexadecimal.
The hexadecimal equivalent of 11011 is 1B.
HOW TO CONVERT THE
FOLLOWING:
1 0 1 1
+ 1 1 0 1
---------
10 0 0 0
So the sum of 1011 and 1101 in binary is 10000.
ARITHMETIC OPERATION
OF NUMBER SYSTEM
1 1 0 1
- 1 0 1 1
-----------
1 0 1 0
1 0 1 1
X 1 1 0 1
-----------
1 0 1 1
0 0 0 0 .
+ 1 0 1 1 ..
-------------
1 1 1 0 1 1
ARITHMETIC OPERATION
OF NUMBER SYSTEM
1 0
11 | 1 0 1 1
1 1
-----
1 1
1 1
---
0