You are on page 1of 6

ITIF0014 FUNDAMENTALS OF INFORMATION TECHNOLOGY

LAB TUTORIAL 3

DATA REPRESENTATION

Octal number

1. Octal also known as Base 8 system or octal system number because it has 8 digits from 0-7.
2. It is one of system number to represent binary system that functional as machine language.

Differentiation between octal number and decimal number

Decimal number Octal number


Base 10 Base 8
Decimal system number Octal system number
Mark with subscript 10 Mark with subscript 8
Place value: 1, 10, 100, 1000 and etc. Place value: 1, 8, 64, 512 and etc..

Conversion of decimal number to octal number

1. Computer system and electronic components use binary number to store the data.
2. Common method that can be used to convert decimal to octal:
i. Decimal divide by 8, each time is remainder is obtained from the previous digit.
ii. The first remainder obtained is the least significant digit (LSD) and the last remainder is the
most significant digit (MSD).
iii. Once the quotient is less than 8, we obtain the octal number by writing the remainder in
reverse order.

Conversion of octal number to decimal.

1. This conversion can be done by using it base number. Its reverse method from decimal to octal.
Conversion of octal number to binary.

1. Since there are only 8 digits (0-7 digits) in octal representation system and its base (i.e., 8) is equivalent
to 23 = 8.
2. So, you can represent each digit of octal in group of 3 bits in binary number.
(XXX2 = X8)

Conversion of binary number to octal number.

1. Split the digits of a given binary number into group from right to left side, each containing of 4 bits
2. Find the equivalent octal number for each group
3. Write the all-group’s octal numbers together maintaining the group order provides the equivalent octal
number for the given binary.

Conversion ASCII Code to octal number based on characters


1. 1 byte is a combination of 8 bit that can be used to represent 256 different characters. This combination
named as coding scheme.
2. Main code ASCII is in decimal number. Therefore, ASCII code must be converted to base 8 system.
3. There are TWO (2) methods:
i. Divide the decimal number to be converted by the value of the new base and use the
remainder.
ii. Refer to the ASCII table.

4. Relationship between base 8 system with ASCII code in machine language.


i. Machine code or machine language consists of base language that can be understand by
computer.
ii. Computer program can be written in programming language such as C++, Java, Visual Basic,
and Phyton. However, these codes need to be translated to machine language because
computer cannot understand it directly.
iii. ASCII code use binary number to tell digital tools about data input.

Electronic signal (ASCII


code binary number) are
Data input
sent to processor unit
through bus system

After the process, ASCII


The electronic signals are
code convert to
sent to the memory for
characters and display in
storage.
the screen

EXERCISE

1. Complete questions below with calculation steps to convert the following decimal to base 8 system
using method divide by 8 and use the remainder.
a) 656610 =

6566 / 8 = remainder
remainder
remainder
remainder
remainder

b) 5107710 =

51077 / 8 = remainder
remainder
remainder
remainder
remainder

2. Complete questions below with calculation steps to convert base 8 to decimal.

a) 33778 =

83 82 81 80

_____ + _____ + _____ + _____ =

b) 124528 =

83 82 81 80

_____ + _____ + _____ + _____ =

3. Complete questions below with calculation step to convert base 8 to binary number.
 Split each digit in base 8 to three digit in base 2, using the three-digit base 2 equivalent.

a) 758 =

75
b) 5368 =

536

c) 22708 =

2270

d) 643148 =

64314

4. Complete questions below with calculation step to convert base 2 to base 8.


 Split number into sets of three, starting with the right-most digit, then convert each set of
three to its equivalent in base 8.

a) 11112 =

b) 100001102 =

c) 110111011002 =
d) 1110100011012 =

5. Show step to convert text “BAIT” from the decimal ASCII code to base 8 using method divide by
8 and use the remainder.

ASCII code for character “B” = ____10


Character “B” represent = _____8

ASCII code for character “A” = ____10


Character “A” represent = _____8

ASCII code for character “I” = ____10


Character “I” represent = _____8

ASCII code for character “T” = ____10


Character “T” represent = _____8

So, base 8 system for “BAIT” is =

You might also like