0% found this document useful (0 votes)
106 views

Module 2 Computer Programming

2nd year Computer Programming for Engineering

Uploaded by

Ryza Jane
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
106 views

Module 2 Computer Programming

2nd year Computer Programming for Engineering

Uploaded by

Ryza Jane
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 43

Learning Module in Computer Fundamentals with C Programming

Unit 2: The Data Coding System


UNIT 2

THE DATA CODING SYSTEM

LESSON 1: Types of Computer Number System

DURATION: 3 hours

INTRODUCTION

Computers understand machine language only. Every instruction given


to computer gets converted into machine language. This language comprises
of numbers. In order to understand it, one has needs to have better
understanding of number system. The number system is a way to represent
or express numbers. You have heard of various types of number systems
such as the whole numbers and the real numbers. But in the context of
computers, we define other types of number systems.

In this lesson, we are going to discuss the 4 types of computer number


system and their comparison through a conversion table.

OBJECTIVES
At the end of this lesson, you will be able to:

✓ Identify different computer number system and their comparison


✓ Define base, weight, radix point, and binary point
✓ Identify the two states of digital circuit in binary numbers
✓ Understand why the hexadecimal number system is used in computer
world

PRE-TEST 2.1
Let’s assess your knowledge about the lesson by answering the
following questions: (Encircle letter of your answer)

1. The hexadecimal digits are 1 to 0 and A to ____.


a. Z b. J c. G d. F

2. How many bytes are there in 1011 1001 0110 1110 numbers?
a. 16 b. 2 c. 4 d. 8

3. 26 is equivalent to ____ in decimal numbers.


a. 64 b. 3 c. 12 d. 8

4. Decimal number 8 is 1000 in binary numbers and _____ in octal


numbers.
a. 8 b. 7 c. 1 d. 10

1
Learning Module in Computer Fundamentals with C Programming
Unit 2: The Data Coding System
LESSON PROPER/COURSE METHODOLOGY
Activity 2.1.1
Before going further with our lesson, let’s have a quick exercise to
assess your knowledge regarding the things we are going to discuss later.

In your own words, define the following terminologies:

1. Decimal
________________________________________________________
________________________________________________________
2. Binary
________________________________________________________
________________________________________________________
3. Octal
________________________________________________________
________________________________________________________
4. Hexadecimal
________________________________________________________
________________________________________________________

Analysis
Congratulations for completing the first two tasks. For you to
completely understand our lesson, you need to analyze and reflect on your
previous activities.
Complete each statement based on your experience.
1. The activities above made me remember
________________________________________________________
________________________________________________________
________________________________________________________
2. It made me think and realize that
________________________________________________________
________________________________________________________
________________________________________________________
3. Now, I want to learn and understand more on
________________________________________________________
________________________________________________________
________________________________________________________

2
Learning Module in Computer Fundamentals with C Programming
Unit 2: The Data Coding System
Abstraction
As mention earlier, the technique to represent and work with numbers
is called number system. Decimal number system is the most common
number system. Other popular number systems include binary number
system, octal number system and hexadecimal number system. Below are the
mentioned types of number system and their discussions:

1. Decimal Number System – This is the most commonly used


number system in the world. It uses ten different characters to show
the values of numbers. Because the system uses ten different
characters, it is called the base 10 system. The base of a number
system tells you how many different characters are used. The
mathematical term for the base of a number system is radix. The
symbols used are called Arabic numerals consisting of 10 symbols
(0, 1, 2, 3, 4, 5, 6, 7, 8, 9). The radix or the base of a decimal
system is ten (10).

2. Binary Number System – In many ways, this system is simpler


than the decimal number system because it uses only two
characters. The binary number system is used in digital electronics
because digital circuits have only two states (two signal levels).
Most of the time, 0 and 1 are the two characters used. This is ideal
for computer processing because the “1” is used to denote electrical
pulse or signal and “0” is used to denote the absence of such
signal. The binary notations “0” and “1” are called bits, which is an
acronym for BInary digiTs. Often when referring to binary numbers
you will hear the terms “LSB” (least significant bit) and “MSB” (most
significant bit). These are very much like the terms we use when
speaking of decimal numbers. In decimal numbers we refer to the
most significant digit (MSD) and the least significant digit (LSD).
The LSB is the bit with the least weight. The MSB is the bit with the
greatest weight. Normally, binary numbers are shown with the MSB
as the leftmost bit.
Example:

Figure 2.1.1 Parts of a Number

The radix or the base of a binary system is two (2).

3
Learning Module in Computer Fundamentals with C Programming
Unit 2: The Data Coding System
Some other common figures, which are used in special situations,
are the following:

One State Opposite State


Off On
Low High
Open Closed

Table 2.1.1 The Powers of 2 and Their Decimal Equivalents


4096

2048

1024

512

256

128

64

32

16

1
212 211 210 29 28 27 26 25 24 23 22 21 20

Table 2.1.2 The Negative Powers of 2 and Their Decimal Equivalents


0.03125

0.01562
0.0625
0.125
0.25
0.5

5
2-1 2-2 2-3 2-4 2-5 2-6

3. Octal Number System – This system is shorthand method for


replacing groups of binary digits by single octal digit to reduce the
number of digits required in representing any number. It has a radix
or base of eight (8), consisting of 0, 1, 2, 3, 4, 5, 6, 7.

4. Hexadecimal Number System – refers to the base 16 number


system in which 16 different characters are used, consisting of 0, 1,
2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F.

Why is the hexadecimal numbering system used? We know that no


electronic system uses 16 different levels in the way that binary
electronics uses two different levels. This system is not required by
the machines. It is a convenience for people. The hexadecimal
numbering system is used in the world of computers as a shorthand
technique.

Stop and think of some of the common uses for binary numbers.
You can see that there is a very real problem because of their
length. For example, many computers use an 8-bit word. That is,
when they work with a binary number, it has 8 bits. This 8-bit
number has just as many characters as the decimal numbers from
any value from 0 to 99,999,999. Clearly, the binary number that

4
Learning Module in Computer Fundamentals with C Programming
Unit 2: The Data Coding System
represents a large decimal number like 99,999,999 is very long. In
fact the binary version of 99,999,999 is 27 bits long. Such a long
number is very difficult to read. So, the hexadecimal numbering
system is used as a shorthand method to reduce the length of
binary numbers.

Sixteen, as we know, is the fourth power of 2. That is, 16 = 2 4. Each


of the 16 hexadecimal characters (0 through F) can be represented
by a 4-bit binary number, that is, 00002 to 11112. This means that
one hexadecimal character can serve as a shorthand notation for a
4-bit binary number.

Table 2.1.3 Comparison Table for the Four Common


Computer Number System
DECIMAL BINARY OCTAL HEXADECIMAL
0 0000 0 0

1 0001 1 1

2 0010 2 2

3 0011 3 3

4 0100 4 4

5 0101 5 5

6 0110 6 6

7 0111 7 7

8 1000 10 8

9 1001 11 9

10 1010 12 A

11 1011 13 B

12 1100 14 C

13 1101 15 D

14 1110 16 E

15 1111 17 F

16 10000 20 10

5
Learning Module in Computer Fundamentals with C Programming
Unit 2: The Data Coding System
Application
In the previous section, you just learn the four common types of
number systems, their meaning, and importance.
In order to retain those learning you have acquired, you need to make
a Powerpoint Presentation about our lesson. Your presentation should be
creative enough for it to be informative as well as interesting for the readers.

REFLECTION/LEARNING INSIGHTS
To assess the learning you have acquired from our lessons and
activities, write an essay answering the question below:
“Why do we need different number system?”
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________

6
Learning Module in Computer Fundamentals with C Programming
Unit 2: The Data Coding System
LESSON 2: Computer Codes

DURATION: 3 hours

INTRODUCTION

The internal circuitry of a computer needs to represent only binary ones


and zeros in its operations. However, several binary-based coding systems
have been devised to express the machine language instruction codes
executed by the CPU and to represent the characters of data processed by
the computer. These computer codes make the job of communicating with a
computer easier and more efficient. They should be considered as shorthand
methods of expressing the binary patterns within a computer.

In this lesson, we are going to discuss three (3) of the commonly used
computer codes.

OBJECTIVES
At the end of this lesson, you will be able to:

✓ Learn about computer data


✓ Understand the representation of data in binary
✓ Identify the most commonly used computer codes

PRE-TEST 2.2

Let’s assess your knowledge about the lesson by answering the


following questions: (Encircle the letter of your answer)

1. The following is a message encoded in ASCII-8. What is the message?

01001000 01000101 01001100 01010000

a. HIGH b. HELP c. STEP d. FIRE

2. An operator is typing in a BASIC program at the keyboard of a certain


microcomputer. The computer converts each keystroke into its ASCII
code and stores the code as a byte in memory. Determine the binary
strings that will be entered into memory when the operator types in the
following statement: GOTO

a. 01000111 01001111 01010100 01001111


b. 10100101 01001110 10101011 01001111
c. 01000111 01001101 01011101 10101111
d. 01110110 10110101 01001110 10101011

7
Learning Module in Computer Fundamentals with C Programming
Unit 2: The Data Coding System
LESSON PROPER/COURSE METHODOLOGY

Activity 2.2.1

Before going further with our lesson, let’s have a quick exercise to
assess your knowledge regarding the things we are going to discuss later.

In your own words, define the following terminologies:

1. Binary Coded Decimal System


________________________________________________________
________________________________________________________
________________________________________________________
2. American Standard Code for Information Interchange
________________________________________________________
________________________________________________________
________________________________________________________
3. Extended BCD Interchange Code
________________________________________________________
________________________________________________________
________________________________________________________

Analysis
Congratulations for completing the first two tasks. For you to
completely understand our lesson, you need to analyze and reflect on your
previous activities.
Complete each statement based on your experience.
a. The activities above made me remember
________________________________________________________
________________________________________________________
________________________________________________________
b. It made me think and realize that
________________________________________________________
________________________________________________________
________________________________________________________
c. Now, I want to learn and understand more on
________________________________________________________
________________________________________________________
________________________________________________________

8
Learning Module in Computer Fundamentals with C Programming
Unit 2: The Data Coding System
Abstraction

Computer codes are used for internal representation of data in


computers. As computers used binary numbers for internal data
representation, computer codes use binary coding schemes.

In binary coding, every symbol that appears in the data is represented


by a group of bits. The group of bits used to represent a symbol is called a
byte. As most modern coding schemes use 8 bits to represent a symbol, the
term byte is often used to mean a group of 8 bits.

Commonly used computer codes are Binary Coded Decimal System


(BCD), American Standard Code for Information Interchange (ASCII), and
Extended BCD Interchange Code (EBCDIC).

1. BCD (Binary Coded Decimal System)

BCD is a method to represent decimal numbers with 4-bit binary words.


BCD uses the words from 0000 to 1001 to represent the decimal numbers 0 to
9. It uses 0001 0000 to 1001 1001 to represent decimal numbers 10 to 99.
Each decimal digit will be represented using 4-bit binary word.
Table 2.2.1 Decimal to BCD Conversion
Decimal Number BCD
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001
10 0001 0000
: :
99 1001 1001
100 0001 0000 0000
: :
999 1001 1001 1001
1000 0001 0000 0000 0000

2. ASCII (American Standard Code for Information Interchange)

This was originally a seven-bit code, which represented 128 (27)


different characters. However, eight-bit versions (sometimes called ASCII-8),
which can represent 256 characters, are now widely used. ASCII is a
standardized code first developed for data communications between

9
Learning Module in Computer Fundamentals with C Programming
Unit 2: The Data Coding System
computers and input/output devices. However, it is used by most
microcomputers and minicomputers, as well as by many larger computers.
ASCII has been adopted as a standard code by national and international
standards organizations.

ASCII-8 was divided into three groups:


• ASCII control characters (character code 0-31) - The first 32
characters in the ASCII-table are unprintable control codes and are
used to control peripherals such as printers.

• ASCII printable characters (character code 32-127) - Codes 32-127


are common for all the different variations of the ASCII table, they are
called printable characters, represent letters, digits, punctuation marks,
and a few miscellaneous symbols. You will find almost every character
on your keyboard. Character 127 represents the command DEL.

• The extended ASCII codes (character code 128-255) - There are


several different variations of the 8-bit ASCII table. Codes 129-159
contain the Microsoft® Windows Latin-1 extended characters.

3. EBCDIC (Extended BCD Interchange Code)

This is used by IBM and some other mainframe and mini computers
and can provide 256 (28) different coding arrangements.

Table 2.2.2 ASCII printable characters (character code 32-127)

DEC OCT Hex BIN Symbol Description


32 040 20 00100000 Space
33 041 21 00100001 ! Exclamation mark
Double quotes (or speech
34 042 22 00100010 "
marks)
35 043 23 00100011 # Number
36 044 24 00100100 $ Dollar
37 045 25 00100101 % Procenttecken
38 046 26 00100110 & Ampersand
39 047 27 00100111 ' Single quote
Open parenthesis (or open
40 050 28 00101000 (
bracket)
Close parenthesis (or close
41 051 29 00101001 )
bracket)

10
Learning Module in Computer Fundamentals with C Programming
Unit 2: The Data Coding System

DEC OCT Hex BIN Symbol Description


42 052 2A 00101010 * Asterisk
43 053 2B 00101011 + Plus
44 054 2C 00101100 , Comma
45 055 2D 00101101 - Hyphen
46 056 2E 00101110 . Period, dot or full stop
47 057 2F 00101111 / Slash or divide
48 060 30 00110000 0 Zero
49 061 31 00110001 1 One
50 062 32 00110010 2 Two
51 063 33 00110011 3 Three
52 064 34 00110100 4 Four
53 065 35 00110101 5 Five
54 066 36 00110110 6 Six
55 067 37 00110111 7 Seven
56 070 38 00111000 8 Eight
57 071 39 00111001 9 Nine
58 072 3A 00111010 : Colon
59 073 3B 00111011 ; Semicolon
Less than (or open angled
60 074 3C 00111100 <
bracket)
61 075 3D 00111101 = Equals
Greater than (or close
62 076 3E 00111110 >
angled bracket)
63 077 3F 00111111 ? Question mark
64 100 40 01000000 @ At symbol
65 101 41 01000001 A Uppercase A
66 102 42 01000010 B Uppercase B
67 103 43 01000011 C Uppercase C
68 104 44 01000100 D Uppercase D
69 105 45 01000101 E Uppercase E
70 106 46 01000110 F Uppercase F
71 107 47 01000111 G Uppercase G
72 110 48 01001000 H Uppercase H
73 111 49 01001001 I Uppercase I

11
Learning Module in Computer Fundamentals with C Programming
Unit 2: The Data Coding System

74 112 4A 01001010 J Uppercase J


75 113 4B 01001011 K Uppercase K
76 114 4C 01001100 L Uppercase L
DEC OCT Hex BIN Symbol Description
77 115 4D 01001101 M Uppercase M
78 116 4E 01001110 N Uppercase N
79 117 4F 01001111 O Uppercase O
80 120 50 01010000 P Uppercase P
81 121 51 01010001 Q Uppercase Q
82 122 52 01010010 R Uppercase R
83 123 53 01010011 S Uppercase S
84 124 54 01010100 T Uppercase T
85 125 55 01010101 U Uppercase U
86 126 56 01010110 V Uppercase V
87 127 57 01010111 W Uppercase W
88 130 58 01011000 X Uppercase X
89 131 59 01011001 Y Uppercase Y
90 132 5A 01011010 Z Uppercase Z
91 133 5B 01011011 [ Opening bracket
92 134 5C 01011100 \ Backslash
93 135 5D 01011101 ] Closing bracket
94 136 5E 01011110 ^ Caret – circumflex
95 137 5F 01011111 _ Underscore
96 140 60 01100000 ` Grave accent
97 141 61 01100001 A Lowercase a
98 142 62 01100010 B Lowercase b
99 143 63 01100011 C Lowercase c
100 144 64 01100100 D Lowercase d
101 145 65 01100101 E Lowercase e
102 146 66 01100110 F Lowercase f
103 147 67 01100111 G Lowercase g
104 150 68 01101000 H Lowercase h
105 151 69 01101001 I Lowercase i
106 152 6A 01101010 J Lowercase j

12
Learning Module in Computer Fundamentals with C Programming
Unit 2: The Data Coding System

107 153 6B 01101011 K Lowercase k


108 154 6C 01101100 L Lowercase l
109 155 6D 01101101 M Lowercase m
110 156 6E 01101110 N Lowercase n
111 157 6F 01101111 O Lowercase o
DEC OCT Hex BIN Symbol Description
112 160 70 01110000 P Lowercase p
113 161 71 01110001 Q Lowercase q
114 162 72 01110010 R Lowercase r
115 163 73 01110011 S Lowercase s
116 164 74 01110100 T Lowercase t
117 165 75 01110101 U Lowercase u
118 166 76 01110110 V Lowercase v
119 167 77 01110111 W Lowercase w
120 170 78 01111000 X Lowercase x
121 171 79 01111001 Y Lowercase y
122 172 7A 01111010 Z Lowercase z
123 173 7B 01111011 { Opening brace
124 174 7C 01111100 | Vertical bar
125 175 7D 01111101 } Closing brace
126 176 7E 01111110 ~ Equivalency sign – tilde
127 177 7F 01111111 Delete

Example:

1. The following is a message encoded in ASCII-8. What is the message?


01001000 01000101 01000001 01001100

Solution: Convert each eight-code to its hex equivalent. The result is


48 45 41 4C

Now locate these hex values in the ASCII table given on the previous
pages and determine the character represented by each. The results
are
HEAL

13
Learning Module in Computer Fundamentals with C Programming
Unit 2: The Data Coding System
2. An operator is typing in a BASIC program at the keyboard of a certain
microcomputer. The computer converts each keystroke into its ASCII
code and stores the code as a byte in memory. Determine the binary
strings that will be entered into memory when the operator types in the
following statement:
GOTO 25

Solution: Locate each character (including the space) in the ASCII


table and the result will be:

01000111 01001111 01010100 01001111 00100000 00110010


00110101

APPLICATION

In the previous section, you just learn three of the most commonly used
computer codes, their meaning, and importance.
In order to retain those learning you have acquired, answer the
following questions.
1. How many bytes are needed to represent the decimal value 846,569 in
BCD?
________________________________________________________
________________________________________________________
2. What is the largest decimal value that can be represented in BCD
using two bytes?
________________________________________________________
________________________________________________________
3. Represent the decimal 175 by its straight binary equivalent. Then
encode the same decimal number using BCD.
________________________________________________________
________________________________________________________
________________________________________________________
4. An automotive parts shop uses a computer to store all of its parts
numbers in 8-bit ASCII code. The codes for each part are stored in
successive memory locations. List the binary contents of memory that
stores the part number JR2-5.
________________________________________________________
________________________________________________________
________________________________________________________
5. Write the ASCII-8 equivalent of 01010011 01001011 01011001.
________________________________________________________
________________________________________________________
________________________________________________________

14
Learning Module in Computer Fundamentals with C Programming
Unit 2: The Data Coding System
REFLECTION/LEARNING INSIGHTS
To assess the learning you have acquired from our lessons and
activities, write an essay answering the question below:
“What is the importance of Computer Codes?”
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
_____________________________________________________________

15
Learning Module in Computer Fundamentals with C Programming
Unit 2: The Data Coding System
LESSON 3: The Conversion of the Number System

DURATION: 5 hours

INTRODUCTION

In understanding the basic operation of digital or computer systems it is


a pre-requisite to know the conversion of each number system. It is just like
speaking with a foreigner with a different tongue, unless you know the
meaning of each word he says, you could communicate with him effectively.
In this lesson, we are going to discuss the conversion from one number
system to another and vice versa.

OBJECTIVES

At the end of this lesson, you will be able to:

✓ Convert a number’s base


✓ Shortcut methods for converting
✓ Fractional numbers in binary number system

PRE-TEST 2.3

Let’s assess your knowledge about the lesson by numbering the


following steps in order to convert decimal number system to other base
system. (Number the steps from 1 to 6)

____ Divide the quotient of the previous divide by the new base.

____ Get the remainder from Step 1 as the rightmost digit (Least Significant
Digit) of new base number.

____ Divide the decimal number to be converted by the value of the new
base.

____ Record the remainder from the previous step as the next digit of (to the
left) of the new base number.

____ The last remainder thus obtained will be the Most Significant Digit of
the new base number.

____ Repeat last 2 previous steps, getting remainders from right to left, until
the quotient becomes zero in Step 3.

16
Learning Module in Computer Fundamentals with C Programming
Unit 2: The Data Coding System
LESSON PROPER/COURSE METHODOLOGY

Activity 2.3.1
Before going further with our lesson, let’s have a quick exercise to
assess your knowledge regarding the things we are going to discuss later.

In your own thinking, how would you convert the following:

1. Decimal to Binary
________________________________________________________
________________________________________________________
________________________________________________________
2. Binary to Hexadecimal
________________________________________________________
________________________________________________________
________________________________________________________
3. Octal to Decimal
________________________________________________________
________________________________________________________
________________________________________________________
4. Hexadecimal to Octal
________________________________________________________
________________________________________________________
________________________________________________________

Analysis
Congratulations for completing the first two tasks. For you to
completely understand our lesson, you need to analyze and reflect on your
previous activities.
Complete each statement based on your experience.
1. The activities above made me remember
________________________________________________________
________________________________________________________
________________________________________________________
2. It made me think and realize that
________________________________________________________
________________________________________________________
________________________________________________________
3. Now, I want to learn and understand more on
________________________________________________________
________________________________________________________
________________________________________________________

17
Learning Module in Computer Fundamentals with C Programming
Unit 2: The Data Coding System
Abstraction

As you know decimal, binary, octal and hexadecimal number systems


are positional value number systems. To convert binary, octal and
hexadecimal to decimal number, we just need to add the product of each digit
with its positional value. Here we are going to learn other conversion among
these number systems.

1. Binary to Decimal Conversion


Often when you are working with computers, you have to change
binary numbers to their decimal equivalents. There are many different
reasons for doing this. Perhaps the most common reason is the need to
display the number for people who cannot read binary numbers. You must
use the binary-to-decimal conversion process to make the results
meaningful for these people.

The binary-to-decimal conversion process is simple: Using Table 2.1.1


and 2.1.2 in our first lesson, we add the decimal weights of all the bits that
are a “1.” The following two examples demonstrate this process.

Convert 110011002 to decimal.


SOLUTION:

Therefore 110011002 = 20410


Convert 101.0112 to decimal

Solution:

Therefore 101.0112 = 5.37510

18
Learning Module in Computer Fundamentals with C Programming
Unit 2: The Data Coding System
2. Binary to Octal Conversion
Converting a binary to octal or hexadecimal is done by using the
following procedure. Follow the example as you read the procedure.
a. Divide the binary digits into groups (e.g., three for octal and four for
hexadecimal). Start the grouping from right to left for the integer part, in
fraction part start the grouping from left to right.

10000002 = __________ 8

1 000 000
b. Fill in with zeroes to the left of the first digit of the given number in
order to complete the grouping.
Added zeroes

01 000 000
c. Using the place value of the binary system, add the positions with
corresponding 1 digit or bit.

Therefore 10000002 = 1008

Now let us try to convert a fractional binary number 10011111.11012 to


octal system using the given procedures above.

Solution:

Therefore 10011111.11012 = 237.648

19
Learning Module in Computer Fundamentals with C Programming
Unit 2: The Data Coding System
3. Binary to Hexadecimal Conversion

10000002 = __________ 16

Solution:

Therefore 10000002 = 4016

Another, convert 110111001.011012 to hexadecimal using the same


procedure.

Solution:

Therefore 110111001.011012 = 1B9.6816

4. Decimal to Binary Conversion

The process for converting integer decimal numbers into binary numbers
is a specific case of the general process for converting a number in one
base to a number in another base. Suppose you wanted to convert the
decimal number 10 to a binary number. Converting a decimal integer to a
binary integer is done by using the following procedure. Follow the
example as you read the procedure.
1. The number to be converted is divided by the same base of the
number system it is to be converted into. In this case, the decimal
number 10 is divided by 2, the base of the binary number system. In
a division by 2, the remainder must be either 1 or 0. This remainder
becomes the least significant bit of the new number.

20
Learning Module in Computer Fundamentals with C Programming
Unit 2: The Data Coding System

2. The quotient from the division in step 1 is also divided by 2. The


remainder is either 1 or 0. This becomes the next more significant
bit of the resulting number.

3. Once again, the result of the previous division is divided by 2. The


remainder is the next more significant bit.

4. This process continues until the result or the quotient of the division
is 0. The remainder from the last division, a 1, is the most significant
bit of the binary number.

Assembling these four remainders in order gives the binary number


10102.
The following example illustrates the procedure.

Therefore 5710 = 1110012

21
Learning Module in Computer Fundamentals with C Programming
Unit 2: The Data Coding System
Short-hand Method: The given procedure above is a little bit long, by using
table 3.1 regarding the powers of 2 and their decimal equivalents, we could
arrive at the shortest possible solution in converting decimal to binary and
binary to decimal numbers.
Example: To convert 1010 to binary number. Place a 1 to the powers of two
positions that will have a sum of 10 in decimal equivalent, and these are 2 3
and 21 positions, by adding their decimal equivalents we will have 8+2=10.
Using table 3.1,
4096

2048

1024

512

256

128

64

32

16

1
212 211 210 29 28 27 26 25 24 23 22 21 20

0 0 0 0 0 0 0 0 0 1 0 1 0

the answer will be 00000000010102 or simply 10102 (since all the bits after
your MSB are all zeros we can already omit them, because they don’t have
decimal weights)

Again, let us convert 5710 to binary number using table 3.1. To have a decimal
equivalent sum of 57 we should place a 1 to the powers of two positions 25 ,
24 , 23 and 20 .
4096

2048

1024

512

256

128

64

32

16

1
212 211 210 29 28 27 26 25 24 23 22 21 20

0 0 0 0 0 0 0 1 1 1 0 0 1

And the answer will be 00000001110012 or 1110012. Compare the result to


the given solution above, which used a division by two methods, is there any
difference in the result?
The method we have learned to convert decimal to binary numbers is for
integers. Fractions must be handled separately. But the procedure for
fractions is very similar to that of integers. Once the fraction and the integer
are converted, the results are combined as the right-hand and left-hand
numerals around the binary point.

Converting a decimal fraction to a binary fraction is done by using the


following procedure. The example shows how to convert the decimal number
0.375 to a binary number. Follow the example as you read the procedure.

22
Learning Module in Computer Fundamentals with C Programming
Unit 2: The Data Coding System
1. The fraction to be converted is multiplied by the base of the number
system it is to be converted into. In this case, the decimal fraction
0.375 is multiplied by 2, the base of the binary number system.
2 x 0.375 = 0.75

2. If the result of the multiplication is less than 1, the most significant bit of
the new binary number is a 0. If the result is greater than 1, the most
significant bit of the new binary number is a 1.
0.75 < 1

Therefore the MSB is 0.

3. The fraction from the previous multiplication is again multiplied by 2.


Note: This is only the fraction portion. It does not include the integer
portion if the result was greater than 1.
2 x 0.75 = 1.5

4. If the result of the multiplication is less than 1, the most significant bit of
the new binary number is a 0. If the result is equal to or greater than 1,
the next most significant bit of the new binary number is 1.
1.5 > 1

Therefore, the next most significant bit of the binary number is 1.

5. This process continues either until the result of the multiplication is


exactly 1 or until you have sufficient accuracy.
2 x 0.5 = 1.0

The next bit, which will be the LSB, is 1.

Therefore 0.37510 = 0.0112

You will not always be able to reach a result of exactly 1 when you
multiply repeatedly by 2. Therefore, you stop when you get the accuracy you
want – that is, when you have enough bits in your binary fraction for your
needs. The integer result of this last step becomes the least significant bit of
the binary number.

The following examples illustrate this procedure.

0.3437510 = ______ 2

therefore 0.3437510 = 0.010112

23
Learning Module in Computer Fundamentals with C Programming
Unit 2: The Data Coding System
0.310 = ________ 2

This conversion will repeat forever. We shall cut it off after 8 bits of resolution.
Therefore, 0.310 = 0.010011002 , to 8 bits of resolution for fraction.

5. Octal to Binary Conversion

To convert octal or hexadecimal to binary, the steps are as follows:

a. Convert each octal digit (e.g., three BIT pattern for octal and four
BIT pattern for hexadecimal).

b. The zeroes to the left of the most significant bit (MSB) is ignored. In
fractional part, zeroes to the right of the least significant bit (LSB) is
ignored.
1008 = _____________ 2
Solution:

Therefore 1008 = 10000002


Now let us try to convert a fractional octal number 237.648 to binary system
using the given procedures above.

Solution:

Therefore 237.648 = 10011111.11012

24
Learning Module in Computer Fundamentals with C Programming
Unit 2: The Data Coding System
6. Hexadecimal To Binary Conversion
4016 = __________ 2

Solution:

Therefore 4016 = 10000002

Another, convert 1B9.6816 to binary system using the same procedure.

Solution:

Therefore 1B9.6816 = 110111001.011012

7. Decimal to Octal Conversion


The steps for converting decimal to octal and hexadecimal follows
the same principle in converting decimal to binary number system, repeated
division by the new number system’s base technique is used. In the case of
octal system the given decimal integer will have a divisor of 8 while in
hexadecimal system the divisor would be 16. The problem with this kind of
technique is that the solution is very long, imagine if you are going to convert
decimal integer 1000 to binary, octal and hexadecimal number system it is
possible that you can use 2 papers for your solution. To avoid such, you can
make use of the double conversion method. Convert first the given decimal
number to binary and then from binary follow the binary to octal conversion.

25
Learning Module in Computer Fundamentals with C Programming
Unit 2: The Data Coding System
5710 = _________ 8
Solution:
1. First, convert 5710 to binary using the short-hand method discussed earlier.

32

16

1
25 24 23 22 21 20

1 1 1 0 0 1

2. After getting the binary equivalent, convert the result to octal system
following the steps in binary-to-octal conversion.

Therefore 5710 = 718

60.37510 = ___________ 8
Solution:
1. First, convert the integer or whole number part 6010 to binary using the
short-hand method discussed earlier.
32

16

25 24 23 22 21 20

1 1 1 1 0 0

26
Learning Module in Computer Fundamentals with C Programming
Unit 2: The Data Coding System
2. Convert the fractional part 0.37510 to binary using the procedures given
from the previous pages.

3. Once the fraction and the integer are converted, the results are combined
as the right-hand and left-hand numerals around the binary point.
111100.0112
4. After combining, convert the binary result to octal number following the
procedures from binary-to-octal conversion.

Therefore 60.37510 = 74.38

8. Decimal to Hexadecimal Conversion


5710 = _________ 16
Solution:
1. First, convert 5710 to binary using the short-hand method discussed
earlier.
32

16

25 24 23 22 21 20

1 1 1 0 0 1

2. After getting the binary equivalent, convert the result to hexadecimal


system following the steps in binary-to-hexadecimal conversion.

Therefore 5710 = 3916

27
Learning Module in Computer Fundamentals with C Programming
Unit 2: The Data Coding System
60.37510 = ___________ 16
Solution:
1. First, convert the integer or whole number part 6010 to binary using the
short-hand method discussed earlier.

32

16

1
25 24 23 22 21 20

1 1 1 1 0 0

2. Convert the fractional part 0.37510 to binary using the procedures given
from the previous pages.

3. Once the fraction and the integer are converted, the results are combined
as the right-hand and left-hand numerals around the binary point.
111100.0112
4. After combining, convert the binary result to hexadecimal number following
the procedures from binary-to-hexadecimal conversion.

Therefore 60.37510 = 3C.616

9. Octal to Decimal Conversion

The steps for converting octal and hexadecimal to decimal follow the
positional notation as shown in the examples below. Starting from the right,
the base (e.g. 2 for binary, 8 for octal and 16 for hexadecimal) will be raised
to zero power, the next number to the first power, the third number to the
second power, and so on. Get the sum of all numbers and the answer
represents the decimal number.

28
Learning Module in Computer Fundamentals with C Programming
Unit 2: The Data Coding System
718 = ________ 10
Solution:

Therefore 718 = 5710


74.38 = ____________ 10
Solution:

Therefore 74.38 = 60.37510

10. Hexadecimal to Decimal Conversion


3916 = ________ 10
Solution:

Therefore 3916 = 5710


3C.616 = ____________ 10
Solution:

Therefore 3C.616= 60.37510

29
Learning Module in Computer Fundamentals with C Programming
Unit 2: The Data Coding System
11. Octal to Hexadecimal Conversion
In converting octal to hexadecimal you can make use of the double
conversion method. First, get the binary equivalent of the given octal number,
and then convert the resulting binary bits in hexadecimal number by following
the binary-to-hexadecimal conversion discussed earlier.
718 = ________ 16
Solution:

1110012 = ___________ 16

Therefore 718 = 3916

74.38 = ____________ 16
Solution:

111100.0112 = ___________ 16

Therefore 74.38 = 3C.616

30
Learning Module in Computer Fundamentals with C Programming
Unit 2: The Data Coding System
12. Hexadecimal to Octal Conversion
In converting hexadecimal to octal, use the double conversion method.
First, get the binary equivalent of the given hexadecimal number, and then
convert the resulting binary bits in octal number by following the binary-to-
octal conversion discussed earlier.
3916 = ________ 8
Solution:

1110012 = ___________ 8

Therefore 3916 = 718

3C.616 = ____________ 8
Solution:

111100.011016 = ___________ 8

Therefore 3C.616 = 74.38

31
Learning Module in Computer Fundamentals with C Programming
Unit 2: The Data Coding System
Application

In the previous section, you just the methods on how to convert one
number system into other base number system. In order to assess what you
have learn, convert the following numbers:
1. FACE16 = ________________ 10

2. 95210 =___________________ 8

3. 5410 =____________________ 2

4. 100110112 = ______________16

5. 7738 = ___________________ 2

32
Learning Module in Computer Fundamentals with C Programming
Unit 2: The Data Coding System
REFLECTION/LEARNING INSIGHTS
To assess the learning you have acquired from our lessons and
activities, write an essay answering the question below:
“As a future engineer, what is the importance of knowing conversion of
number system?”
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________

33
Learning Module in Computer Fundamentals with C Programming
Unit 2: The Data Coding System
LESSON 4: Data Measurement

DURATION: 1 hour

INTRODUCTION

Bits, Bytes, Kilobytes, Megabytes, Gigabytes, Terabytes are some of


the terms that are usually used in the world of computing to describe disk
space, or data storage space, and system memory. For instance, just a few
years ago people were describing hard drive space using the term
Megabytes. Today, Gigabytes is the most common term being used to
describe the size of a hard drive. In the not so distant future, Terabyte will be
a common term. But what are they? This is where it gets quite confusing
because there are at least three accepted definitions of each term.

In this lesson, we are going to discuss the data measurement and their
importance in computing world.

OBJECTIVES

At the end of this lesson, you will be able to:

✓ Identify different data measurement and their differences


✓ Convert or calculate one data measurement unit to another

PRE-TEST 2.4

Let’s assess your knowledge about the lesson by matching the data
measurement below and their size. (Write the letter of you answer before
each number)

1. 8 Bit a. 1024 Kilobytes

2. 1024 Bytes b. 1 Terabyte

3. 1 Kilobyte c. 1 Exabyte

4. 1 Megabyte d. 1 Byte

5. 1024 Gigabytes e. 1024 Bytes

6. 1 Terabyte f. 1024 Gigabytes

7. 1024 Petabytes g. 1 Kilobyte

8. 1024 Exabytes h. 1 Zettabyte

34
Learning Module in Computer Fundamentals with C Programming
Unit 2: The Data Coding System
LESSON PROPER/COURSE METHODOLOGY
Activity 2.4.1

Before going further with our lesson, let’s have a quick exercise to
assess your knowledge regarding the things we are going to discuss later.

In your own words, define the following terminologies:

1. Petabyte
________________________________________________________
________________________________________________________
________________________________________________________
2. Exabyte
________________________________________________________
________________________________________________________
________________________________________________________
3. Zettabyte
________________________________________________________
________________________________________________________
________________________________________________________
4. Yottabyte
________________________________________________________
________________________________________________________
________________________________________________________

Analysis
Congratulations for completing the first two tasks. For you to
completely understand our lesson, you need to analyze and reflect on your
previous activities.
Complete each statement based on your experience.
1. The activities above made me remember
________________________________________________________
________________________________________________________
________________________________________________________
2. It made me think and realize that
________________________________________________________
________________________________________________________
________________________________________________________
3. Now, I want to learn and understand more on
________________________________________________________
________________________________________________________
________________________________________________________

35
Learning Module in Computer Fundamentals with C Programming
Unit 2: The Data Coding System
Abstraction
According to the IBM Dictionary of computing, when used to describe
disk storage capacity, a megabyte is 1,000,000 bytes in decimal notation. But
when the term megabyte is used for real and virtual storage, and channel
volume, 2 to the 20th power or 1,048,576 bytes is the appropriate notation.
According to the Microsoft Press Computer Dictionary, a megabyte means
either 1,000,000 bytes or 1,048,576 bytes. According to Eric S. Raymond in
The New Hacker's Dictionary, a megabyte is always 1,048,576 bytes on the
argument that bytes should naturally be computed in powers of two. So which
definition do most people conform to?

When referring to a megabyte for disk storage, the hard drive


manufacturers use the standard that a megabyte is 1,000,000 bytes. This
means that when you buy an 80 Gigabyte Hard drive you will get a total of
80,000,000,000 bytes of available storage. This is where it gets confusing
because Windows uses the 1,048,576 byte rule so when you look at the
Windows drive properties an 80 Gigabyte drive will report a capacity of 74.56
Gigabytes and a 250 Gigabyte drive will only yield 232 Gigabytes of available
storage space.

The 1000 can be replaced with 1024 and still be correct using the other
acceptable standards. Both of these standards are correct depending on what
type of storage you are referring.

Processor or Virtual Storage Disk Storage


· 1 Bit = Binary Digit · 1 Bit = Binary Digit
· 8 Bits = 1 Byte (2 )
8 · 8 Bits = 1 Byte
· 1024 Bytes = 1 Kilobyte(kB) - (210) · 1000 Bytes = 1 Kilobyte – (103)
· 1024 Kilobytes = 1 Megabyte(MB) - (220) · 1000 Kilobytes = 1 Megabyte - (106)
· 1024 Megabytes = 1 Gigabyte(GB) - (2 ) 30 · 1000 Megabytes = 1 Gigabyte - (109)
· 1024 Gigabytes = 1 Terabyte(TB) - (240) · 1000 Gigabytes = 1 Terabyte - (1012)
· 1024 Terabytes = 1 Petabyte(PT) - (2 )
50 · 1000 Terabytes = 1 Petabyte - (1015)
· 1024 Petabytes = 1 Exabyte(EB) - (260) · 1000 Petabytes = 1 Exabyte - (1018)
· 1024 Exabytes = 1 Zettabyte(ZB) - (2 )
70 · 1000 Exabytes = 1 Zettabyte - (1021)
· 1024 Zettabytes = 1 Yottabyte(YB) - (2 )
80 · 1000 Zettabytes = 1 Yottabyte - (1024)
Bit: A Bit is the smallest unit of data that a computer uses. It can be used to
represent two states of information, such as 1 or 0.

Byte: A Byte is equal to 8 Bits. A Byte can represent 256 states of


information, for example, numbers or a combination of numbers and letters. 1
Byte could be equal to one character as discussed in ASCII-8 representation.
10 Bytes could be equal to a word. 100 Bytes would equal an average
sentence.

Kilobyte: A Kilobyte is approximately 1,000 Bytes, actually 1,024 Bytes


depending on which definition is used. 1 Kilobyte would be equal to this
paragraph you are reading, whereas 100 Kilobytes would equal an entire page.

36
Learning Module in Computer Fundamentals with C Programming
Unit 2: The Data Coding System
Megabyte: A Megabyte is approximately 1,000 Kilobytes. In the early days of
computing, a Megabyte was considered to be a large amount of data. These
days with a 500 Gigabyte hard drive on a computer being common, a
Megabyte doesn't seem like much anymore. One of those old 3-1/2 inch
floppy disks can hold 1.44 Megabytes or the equivalent of a small book. 100
Megabytes might hold a couple volumes of Encyclopedias. 600 Megabytes is
about the amount of data that will fit on a CD-ROM disk.

Gigabyte: A Gigabyte is approximately 1,000 Megabytes. A Gigabyte is still a


very common term used these days when referring to disk space or drive
storage. 1 Gigabyte of data is almost twice the amount of data that a CD-
ROM can hold. But it's about one thousand times the capacity of a 3-1/2
floppy disk. 1 Gigabyte could hold the contents of about 10 yards of books on
a shelf. 100 Gigabytes could hold the entire library floor of academic journals.

Terabyte: A Terabyte is approximately one trillion bytes, or 1,000 Gigabytes.


To put it in some perspective, a Terabyte could hold about 3.6 million 300
Kilobyte images or maybe about 300 hours of good quality video. A Terabyte
could hold 1,000 copies of the Encyclopedia Britannica. Ten Terabytes could
hold the printed collection of the Library of Congress. That's a lot of data.

Petabyte: A Petabyte is approximately 1,000 Terabytes or one million


Gigabytes. It's hard to visualize what a Petabyte could hold. 1 Petabyte could
hold approximately 20 million 4-door filing cabinets full of text. It could hold
500 billion pages of standard printed text. It would take about 500 million
floppy disks to store the same amount of data.

Exabyte: An Exabyte is approximately 1,000 Petabytes. Another way to look


at it is that an Exabyte is approximately one quintillion bytes or one billion
Gigabytes. There is not much to compare an Exabyte to. It has been said that
5 Exabytes would be equal to all of the words ever spoken by mankind.

Zettabyte: A Zettabyte is approximately 1,000 Exabytes. There is nothing to


compare a Zettabyte to but to say that it would take a whole lot of ones and
zeroes to fill it up.

Yottabyte: A Yottabyte is approximately 1,000 Zettabytes. It would take


approximately 11 trillion years to download a Yottabyte file from the Internet
using high-power broadband. You can compare it to the World Wide Web as
the entire Internet almost takes up about a Yottabyte.

37
Learning Module in Computer Fundamentals with C Programming
Unit 2: The Data Coding System
Application

In the previous section, you just learn different units of data measurements
and their equivalent.
In order to assess your learning about the lesson, answer the following
questions with their solutions and explanation.

1. How many bytes are in a 32-bit string (a string of 32 bits)?

2. What is the largest decimal value that can be represented in binary


using two bytes?

3. How many gigabytes do I have if I have 12000 megabytes?

4. How many megabytes do I have if I have 4000 kilobytes?

5. A typical CD-ROM can store 650 megabytes of digital data. Since mega = 220,
how many bits of data can a CD-ROM hold?

38
Learning Module in Computer Fundamentals with C Programming
Unit 2: The Data Coding System
REFLECTION/LEARNING INSIGHTS

To assess the learning you have acquired from our lesson and
activities, write an essay answering the question below:
“What is the importance of knowing and understanding
Computer Data Measurements?”
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________

39
Learning Module in Computer Fundamentals with C Programming
Unit 2: The Data Coding System
POST-TEST

Congratulations! You are about to complete our unit. In order to assess


what you have learned from our lessons and to determine whether you met
our learning objectives, you just need to answer the following post-test
questions.

Part 1: Answer the following questions and write a brief explanation why it is
your answer based on what you have learned from our Lesson 1.

1. The hexadecimal digits are 1 to 0 and A to ____.


________________________________________________________
________________________________________________________
2. How many bytes are there in 1011 1001 0110 1110 numbers?
________________________________________________________
________________________________________________________

3. 26 is equivalent to ____ in decimal numbers.


________________________________________________________
________________________________________________________

4. Decimal number 8 is 1000 in binary numbers and _____ in octal


numbers.
________________________________________________________
________________________________________________________

Part 2: Explain the answers of the following questions from Pretest 2.2.

1. The following is a message encoded in ASCII-8. What is the message?

01001000 01000101 01001100 01010000

b. HIGH b. HELP c. STEP d. FIRE

The answer is b. HELP, explain why. You can show your solution.
________________________________________________________
________________________________________________________
________________________________________________________
________________________________________________________
________________________________________________________
________________________________________________________
________________________________________________________
______________________________________________________

40
Learning Module in Computer Fundamentals with C Programming
Unit 2: The Data Coding System
2. An operator is typing in a BASIC program at the keyboard of a certain
microcomputer. The computer converts each keystroke into its ASCII
code and stores the code as a byte in memory. Determine the binary
strings that will be entered into memory when the operator types in the
following statement: GOTO

e. 01000111 01001111 01010100 01001111


f. 10100101 01001110 10101011 01001110
g. 01000111 01001101 01011101 10101111
h. 01110110 10101011 01001110 10101011

The answer is a., explain why. You can show your solution.
________________________________________________________
________________________________________________________
________________________________________________________
________________________________________________________
________________________________________________________
_______________________________________________________

Part 3: Convert a decimal number to binary system using the steps you have
arranged in Pretest 2.3. Write the label in every step.

022610 = ________________________________2

Solution with Step Label:

41
Learning Module in Computer Fundamentals with C Programming
Unit 2: The Data Coding System
Part 4: Provide the size of the following Data Measurement with solution if
there is any.

1. 8 bit = __________ Byte/s

2. 1024 Bytes = __________ Kilobyte/s

3. 1 Kilobyte = __________ Byte/s

4. 1 Megabyte = __________ Kilobyte/s

5. 1024 Gigabytes = __________ Terabyte/s

6. 1 Terabyte = __________ Gigabyte/s

7. 1024 Petabytes = __________ Exabyte/s

8. 1024 Exabytes = __________ Zettabyte/s

42
Learning Module in Computer Fundamentals with C Programming
Unit 2: The Data Coding System
FINAL REQUIREMENT

To further enhance your knowledge about Computer Number System.


Convert the following number from one base to another. Write your answer
with solution in a short bond paper. Use engineering lettering. This will serve
as your unit test.

1. Convert 011010012 to decimal

2. Convert 10 0011012 to hexadecimal

3. Convert 1518 to decimal

4. Convert 1238 to binary

5. Convert 15B16 to decimal

6. Convert 1238 to hexadecimal

7. Convert 15610 to binary

8. Convert 1F316 to binary

9. Convert 123410 to octal

10. Convert 1F316 to Octal

SUGGESTED READINGS AND WEBSITES

Computer Logical Organization Tutorial


https://www.tutorialspoint.com/computer_logical_organization/index.htm

Computer Fundamentals: Number System


https://www.cl.cam.ac.uk/teaching/1415/CompFund/NumberSystemsAnnotate
d.pdf

Number Systems
http://voccomputerscience.orgfree.com/ComputerFundamentals/pdf/Chapter
%2003-Number%20System.pdf

REFERENCES

Dela Cruz, C.V. (2015). Learning Guide in Comp 212/211L.

Computer Fundametals Retrieved from


http://voccomputerscience.orgfree.com/ComputerFundamentals/

43

You might also like