Course Code CC1 - LECTURE
Description Computer Fundamentals
Pre-Requisite None
Department: College of Computer Studies Week 4
Data Representation and Number System Module 3
LEARNING OUTCOMES
At the end of this module, you should able to:
1. Discuss how data are being represented inside the computer;
2. Convert different number system.
INTRODUCTION
Data Representation
Computer is one among the breakthroughs of development in the world. People can use
computers in many ways like accessing information and communicating it with others.
Data represented inside the computer takes the form of an electronic signal. To process,
computers convert data to a series of 1’s and 0’s called binary codes. 1 represents on state and
0 represents off state.
COURSE CONTENT
Number System
Number System Base digits Example
Binary 2 0,1 10001010101
Octal 8 0,1,2,3,4,5,6,7 243, 567, 134
Decimal 10 0,1,2,3,4,5,6,7,8,9 1,200/ 435 / 10
Hexadecimal 16 0-9, A- F 7A34, 2EB, 123
Where:
A= 10, B=11, C=12, D=13, E=14, F=15
Conversion of Number System
Decimal to Binary, Octal, Hexadecimal
To convert given decimal to its binary format, simply divide the
given by 2 for binary, 8 for octal and 16 for hexadecimal. Write the
quotient and the remainder. If the quotient is greater than or equal
to the base, continue to divide until the last quotient is less than
base. To get the result, start from the last quotient going to the
first remainder.
Example:
Decimal to Binary To check your answer, apply the place value
3001
0 2
Place value
15 3 1 25 12 6 3 1
2 300 0 75 7 8 9 4 2 1 6 6 4 2 6 8 4 2 1 Multipl
15 3 1 y
300 0 74 6 8 8 4 2 1 0 0 1 0 1 1 0 0
25 3
0 0 1 1 0 1 0 0 6 0 0 2 0 8 4 0 0 300
Add Sum
Final answer: 100101100 2
To check your answer, apply the
Decimal to Octal place value
45010 8 7 0 28 - 10
45 5
8 0 6 7 64 8 1
44 5
8 6 7 0 2
2 0 1x2 = 2
8x0 = 0
44
Final answer: 702 8 64 x 7 = 8
45
0
To check your answer, apply the
Decimal to Hexadecimal place value
750 10 - 16 Note: 14 is equivalent to E
256 16 1
16 750 46 2 2 E E
736 32 14 x 1 =
14 14 14 x 16 =
2 x 256 =
Final answer: 2E E16
Binary to Octal
1 0 0 1 0 1 1 0 02 to 8
Apply to positional value 4 2 1, group the given by 3 starting from the extreme
right.
1 0 0 1 0 1 1 0 0
4 2 1 4 2 1 4 2 1
4 5 4
Final answer: 4548
Octal to Binary
Write the given octal number with space in between
4 5 4
Apply the positional value 4 2 1 to each of the given number.
4 5 4
4 2 1 4 2 1 4 2 1
Put 1 or 0 to cover the given, 1 corresponds to an "on" and 0 corresponsd to an
"off"
4 5 4
4 2 1 4 2 1 4 2 1
1 0 0 1 0 1 1 0 0
Final answer: 1 0 0 1 0 1 1 0 02
Binary to Hexadecimal
1 0 0 1 0 1 1 0 02 to 16
Apply to positional value 8 4 2 1, group the given by 4 starting from the extreme
right.
0 0 0 1 0 0 1 0 1 1 0 0
8 4 2 1 8 4 2 1 8 4 2 1
1 2 12 = C
Final answer: 12C
Hexadecimal to Binary
_______
12 C 16 to _ 2
Write the given octal number with space in between, and apply the positional value 8 4
21
1 2 C
8 4 2 1 8 4 2 1 8 4 2 1
Put 1 or 0 to cover the given, 1 corresponds to an "on" and 0 corresponsd to an "off"
1 2 C
8 4 2 1 8 4 2 1 8 4 2 1
0 0 0 1 0 0 1 0 1 1 0 0
Final answer: 1 0 0 1 0 1 1 0 0
Octal to Hexadecimal
1. Apply Octal to Binary
2. Apply Binary to Hexadecimal
to
ex. 454 8 ______ 16
Write the given octal number with space in between
4 5 4
Apply the positional value 4 2 1 to each of the given number.
4 5 4
4 2 1 4 2 1 4 2 1
Put 1 or 0 to cover the given, 1 corresponds to an "on" and 0 corresponsd to an "off"
4 5 4
4 2 1 4 2 1 4 2 1
1 0 0 1 0 1 1 0 0
Apply Binary to Hexadecimal, group the given by 4
1 0 0 1 0 1 1 0 0
Apply the positional value 8 4 2 1
1 0 0 1 0 1 1 0 0
1 8 4 2 1 8 4 2 1
Add the positional value with 1 value
1 0 0 1 0 1 1 0 0
1 8 4 2 1 8 4 2 1
8 + 4 = 12 = C
Final answer: 1 2 C
Hexadecimal to Binary
_______
12 C 16 to _ 2
Write the given octal number with space in between, and apply the positional value 8 4
21
1 2 C
8 4 2 1 8 4 2 1 8 4 2 1
Put 1 or 0 to cover the given, 1 corresponds to an "on" and 0 corresponsd to an "off"
1 2 C
8 4 2 1 8 4 2 1 8 4 2 1
0 0 0 1 0 0 1 0 1 1 0 0
Final answer: 1 0 0 1 0 1 1 0 0
Octal to Hexadecimal
1. Apply Octal to Binary
2. Apply Binary to Hexadecimal
to
ex. 454 8 ______ 16
Write the given octal number with space in between
4 5 4
Apply the positional value 4 2 1 to each of the given number.
4 5 4
4 2 1 4 2 1 4 2 1
Put 1 or 0 to cover the given, 1 corresponds to an "on" and 0 corresponsd to an "off"
4 5 4
4 2 1 4 2 1 4 2 1
1 0 0 1 0 1 1 0 0
Apply Binary to Hexadecimal, group the given by 4
1 0 0 1 0 1 1 0 0
Apply the positional value 8 4 2 1
1 0 0 1 0 1 1 0 0
1 8 4 2 1 8 4 2 1
Add the positional value with 1 value
1 0 0 1 0 1 1 0 0
1 8 4 2 1 8 4 2 1
8 + 4 = 12 = C
Final answer: 1 2 C
Hexadecimal to Octal
1. Apply solution to covert Hexa to Binary and then Binary to Octal
FOCUS QUESTION/S
1. Can you perform conversion across number system?
LEARNING ACTIVITIES
Online activity 1 Number system Conversion
ASSIGNMENT
Assignments No. 4
Search on the following:
1. Number conversion
ASSESSMENT/EVALUATION
Short Quiz – Number conversion
RELATED READINGS/REFERENCES
Any Fundamental to Computer books available
Prepared by: Noted by: Approved by:
DR. RITO A. CAMIGLA JR DR. RITO A. CAMIGLA JR DR. RITO A. CAMIGLA JR
Faculty Dean of Academics VP for Academics