Number System
Number System
Number System
CCS0001L
(INTRODUCTION TO COMPUTING LABORATORY)
EXERCISE
2
NUMBER SYSTEMS
<STUDENT NAME>
<SECTION>
<DATE>
I. OBJECTIVES
At the end of this exercise, students must be able to:
Human beings use a 10 based or decimal number system, possibly because we have ten
fingers and ten toes. Computers use a 2 based or binary system because it can be represented
easily in hardware by on-off, open-closed, charged-uncharged states. For example a capacitor
in RAM memory can be charged or not charged. A charged state represents a 1 and an
uncharged (or not fully charged) state represents a 0. Likewise data stored on a hard disk at
the molecular level can be magnetically aligned in one pattern or its opposite. Each pattern
represents a 1 or 0.
Decimal numbers can be converted to binary numbers, and vice-versa. This is essential as
humans work in decimals and computers work in binary.
Two other forms of number representation can be used to represent integers. They are Octal
and Hexadecimal (Hex for short) systems. The first has a base of 8, the second a base of 16.
This lab helps you understand the methods applied in number system conversion and in
performing arithmetic operations.
III.LABORATORY ACTIVITY
1. Binary to Decimal
Binary Decimal
a) 101001102 = 16610
b) 101101112 = 18310
2. Decimal to Binary
Decimal Binary
a) 12510 = 11111012
b) 43610 = 1101101002
3. Octal to Decimal
Octal Decimal
a) 1238 = 8310
b) 7568 = 49410
4. Decimal to Octal
Decimal Octal
a) 9810 = 1428
b) 36910 = 5618
5. Octal to Binary
Octal Binary
a) 2558 = 010 101 1012
b) 12468 = 001 010 100 1102
6. Binary to Octal
Binary Octal
a) 10 110 110 1012 = 26658
b) 111 010 101 0002 = 72508
7. Hexadecimal to Decimal
Hexadecimal Decimal
a) 15A16 = 34610
b) 2FE16 = 76610
8. Decimal to Hexadecimal
Decimal Hexadecimal
a) 9110 = 5B16
b) 59910 = 37716
9. Hexadecimal to Binary
Hexadecimal Binary
a) 5E8D16 = 0101 1110 1000 11012
b) 0F4C16 = 0000 1111 0100 11002
Binary Hexadecimal
a) 1001 1110 0011 10012 = 9E3916
b) 10 1101 1010 1100 11012 = 2DACD16
TASK 3: PERFORM ARITHMETIC OPERATIONS
1) 1 1 1 1 1 1 1 0 02 2) 10100011002
1 0 1 0 1 1 0 12 - 1011011112
1 1 0 0 0 1 12 -------------------
+ 1 0 1 1 0 12 100011101
-------------------
1100111001
3) 110110112 4) 11000101012
x 11012 ÷ 11102
-------------------- -------------------
101100011111 111000.0101
5) 1 2 3 4 58 6) 12345678
5 5 6 7 18 - 7654318
+ 1 3 5 78 ---------------
------------- 247136
71615
7) FACE16 8) DECADE16
+ 55A2B16 - DEAD16
-------------- --------------------
654F9 DDEC31
Hexadecimal numbers are used as a “shorthand” notation when representing binary addresses
and data. Binary numbers are placed into 4 bit groups and then represented as hex digits. For
example, the 16 bit binary number 1000 0001 1101 0011 can be represented as 81D3 in hex.