0% found this document useful (0 votes)
271 views11 pages

CC 113 A The Computer Number Systems

The document discusses different computer number systems: 1) Binary is the base-2 system that computers use internally, representing 1 as "on" and 0 as "off". 2) Decimal is the base-10 human-readable system. IP addresses use dotted decimal notation. 3) Octal is base-8, used to conserve memory by grouping 3 binary bits. It provides examples of converting between binary, decimal, and octal numbers. Understanding these number systems is important for networking, computer hardware, and becoming an administrator.

Uploaded by

Raymark Timothy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
271 views11 pages

CC 113 A The Computer Number Systems

The document discusses different computer number systems: 1) Binary is the base-2 system that computers use internally, representing 1 as "on" and 0 as "off". 2) Decimal is the base-10 human-readable system. IP addresses use dotted decimal notation. 3) Octal is base-8, used to conserve memory by grouping 3 binary bits. It provides examples of converting between binary, decimal, and octal numbers. Understanding these number systems is important for networking, computer hardware, and becoming an administrator.

Uploaded by

Raymark Timothy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

CC113 (A): Introduction to Computing The Computer Number Systems

(from a book of Copernicus P. Pepito)

The Computer Number Systems


The Essence of Learning These Number Systems
Sometimes in our lives as students has this question in our minds why we study this and that. Are
all these difficult subjects are applicable and useful when we work in the company? How about
this algebra, trigonometry and analytic geometry? Can I apply this when I work abroad? Well, I
cannot answer you with a resounding yes. However, I can answer you that we can use and apply
our knowledge that we learned in studying number system conversion, because it is really an
applied knowledge.

Wise men said that knowledge can only become power when it is applied. I strongly agree. So
here is now the reason:

Computers and networking equipment such as routers and switches work with binary digits
(bits). In other words, the base 2 number system (binary number system) is what the computers
and data communication devices are using for its design, implementation, and operation. Bits can
be either a binary 1 or binary 0 that can represent as the absence (0) or presence (1) of current
which flows within a cable, wire or circuitry in the computer system. In switching system
application, 1 can be an ON state, while 0 can be an OFF state. In writing the programming
logic or algorithm, 1 can be interpreted as True or Yes, while 0 can be interpreted as False or
No.

The bits are encoded internally in the computer system and on networking media (cables or
wires) as either electrical voltage on copper cable such as unshielded twisted pair (UTP) cable or
a light pulses on fiber optic cable and electromagnetic waves in the wireless communication.

Now let us consider the application of these number systems to the Internet technology. We, the
human beings are more comfortable working with decimal numbers, therefore, Internet
Protocol (IP) addresses are usually written as dotted-decimal numbers separated by periods
(dots), each representing an octet, so that we can read them easily. This is referred to as “dotted
decimal notation”. This is in IP version 4 (IPv4) of the Internet Protocol which uses the 32-bit
address scheme (divided into 4 octets) to identify a particular network and a host on the
network.

In IP version 6 (IPv6), the IP address is written in hexadecimal format. We have to remember


that these IP addresses which are written in decimal and hexadecimal numbers will be converted
into its equivalent binary numbers so that the network equipments such as computers, modems,
network interface cards (NIC), routers and switches could understand them.

Knowing and learning binary numbers and how they relate to decimal and hexadecimal numbers
are critical to understanding successfully the network routing, IP addresses, subnets, and
computer circuitry. Not to mention on becoming a successful network administrator or network
engineer someday. Who knows?

Page 1 of 11
CC113 (A): Introduction to Computing The Computer Number Systems
(from a book of Copernicus P. Pepito)

The Binary Number Systems


The binary number system is used in the design and implementation of computer„s hardware and
software. Binary method of notation uses two numbers only, the 0 and 1. The number 1 can be
interpreted as logical true, yes, or on or simply a representation of the presence of current or
signal. While 0 can be interpreted as logical false, no, off or a representation of the absence of
current or signal. The 0 and 1 are called bits, the short term for binary digits.

Binary is a base 2 number system while the decimal is a base 10 number system.
The base 2 number system is what all computers and data communications used to communicate
and process data. Binary numbers are the key to understanding how router works and how
packets get from one workstation (host) to another on a Transport Control Protocol/Internet
Protocol (TCP/IP) network.

Decimal Number System


A decimal number can be expressed as the sum of each digit times a power of ten in expanded
notation. With decimal fraction, this can be expressed also in expanded notation. However, the
values at the right side of the decimal point are the negative power of ten.

Examples:
1.) 7642 = 7 x 103 + 6 x 102 + 4 x 101 + 2 x 100
= 7 x 1000 + 6 x 100 + 4 x 10 + 2 x 1
= 7000 + 600 + 40 + 2
= 7642

2.) 28.36 = 2 x 101 + 8 x 100 + 3 x 10-1 + 6 x 10-2


= 2 x 10 + 8 x 1 + 3/10 + 6 / 100
= 20 + 8 + 0.30 + 0.06
= 28.36

A.) Binary To Decimal Number Conversion


Binary numbers can be converted into decimal number using an expanded notation in base 2
instead of base 10 (in the case of decimal numbers).

Examples:
1.) 102 = 1 x 21 + 0 x 20
=2+0
= 210
2.) 1102 = 1 x 22 + 1 x 21 + 0 x 20
=4+2+0
= 610
3.) 11112 = 1 x 23 + 1 x 22 + 1 x 21 + 1 x 20
=8+4+2+1
= 1510

Page 2 of 11
CC113 (A): Introduction to Computing The Computer Number Systems
(from a book of Copernicus P. Pepito)

B.) Decimal To Binary Number Conversion


Decimal numbers can be converted into binary numbers by dividing it by 2. The remainders are
considered as its binary equivalent by reading it upward or the last remainder is the first to be
read. You have to neglect the numbers after the decimal point in the quotient.

Divide Quotient Remainder


1.) 1410 = 14/2 7 0
= 7/2 3 1
= 3/2 1 1
= ½ 0 1

= 11102

2.) 910 = 9/2 4 1


= 4/2 2 0
= 2/2 1 0
=½ 0 1

= 10012

3.)12010 = 120/2 60 0
= 60/2 30 0
= 30/2 15 0
= 15/2 7 1
= 7/2 3 1
= 3/2 1 1
= ½ 0 1

= 11110002

Page 3 of 11
CC113 (A): Introduction to Computing The Computer Number Systems
(from a book of Copernicus P. Pepito)

The Octal Number System


The Octal Number System has eight basic digits: 0, 1, 2, 3, 4, 5, 6 and 7. It is a Base 8 number
system. The octal number system is used to conserve memory storage location of the computer
system by grouping the binary digits into three. Meaning, 3 bits is equivalent to 1 octal number.

A. Decimal To Octal Number Conversion


To convert decimal number into octal number, first we divide the decimal number by 8. Then we
have to take note the remainder after each computation of division operation. The computation
process will stop when the quotient becomes 0. Again we have to read the remainders in upward
direction or the last number is to be read first.

Examples:
Divide Quotient Remainder
1.) 1010 = 10/8 1 2
= 1/8 0 1
= 128
2.) 13610 = 136/8 17 0
= 17/8 2 1
= 2/8 0 2
= 2108
3.) 149010 = 1490/8 186 2
= 186/8 23 2
= 23/8 2 7
= 2/8 0 2
= 27228

B. Octal To Decimal Number Conversion


To convert octal number to decimal number, we have to multiply each octal number by its
positional value. Then we sum up all the resulting products.

Examples:
1.) 148 = 1 x 81 + 4 x 80
=8+4
= 1210
2.) 2308 = 2 x 82 + 3 x 81 + 0 x 80
= 128 + 24 + 0
= 15210
3.) 68 = 6 x 80
= 610

Page 4 of 11
CC113 (A): Introduction to Computing The Computer Number Systems
(from a book of Copernicus P. Pepito)

C. Octal To Binary Number Conversion


Using the given table below, we can convert octal number to its equivalent binary number. Each
octal number must be converted one at a time by its equivalent binary number.
Octal Binary
0 000
1 001
2 010
3 011
4 100
5 101
6 110
7 111
Examples:
1.) 368 =
3 = 0112
6 = 1102
= 0111102
2.) 1428 =
1 = 0012
4 = 1002
2 = 0102
= 0011000102
3.) 75.038 =
7 = 1112
5 = 1012
0 = 0002
3 = 0112
= 111101.0000112

Other Solution
We can solve this octal to binary conversion by using the following technique:
4 2 1 The Octal Equivalent
111 The Binary Equivalent

For example, we want to convert an octal number 7 to binary number equivalent. Obviously, we
have the answer: 1 1 1. Now if you try to analyze the process, you could notice that we can easily
get the answer by adding the octal number equivalent at the top of each binary number (4+2+1) .

For example again, we want to convert an octal number 6 to binary number equivalent.
We have the answer: 1 1 0 since we simply add the octal number equivalent of each binary
number (4+2). What if we want to convert an octal number 5 to its binary number equivalent?
Going back to our technique, we have the answer : 1 0 1 since we add the octal number
equivalent above each binary number ( 4 + 1). In other words, when we combine the three octal
numbers (7658), we will arrive to the answer : 1111101012.

Page 5 of 11
CC113 (A): Introduction to Computing The Computer Number Systems
(from a book of Copernicus P. Pepito)

What we did with the excess binary number is to simply make it a zero number.
Can you now solve it by your own?

D. Binary To Octal Number Conversion


We just simply reverse the procedure when we convert the binary number into octal number.
You could notice that every octal number has three equivalent binary digits (bits). That‟s why we
group the bits in three during the conversion process. We will add zeroes to complete the group
when incomplete groupings occur. Now refer to the table above to know the corresponding
equivalent.

Other Solution
We can solve this binary to octal conversion by using the following technique:

4 2 1 The Octal Equivalent


111 The Binary Equivalent

For example, to convert the binary number to its equivalent octal number we simply group them
into three bits: 4 2 1 / 4 2 1
111/101
By summing up all the octal numbers equivalent at the top of each respective binary 1 we can get
the right answer: 758 (4 + 2 + 1 / 4 + 1).

Another example; to convert the binary number 100110000 to its equivalent octal number, we
group them again into three bits: 4 2 1 / 4 2 1 / 4 2 1
100/110/000

Now summing up all the octal numbers at the top of each respective binary 1, we will arrive to
the answer: 4608 ( 4+0+0 / 4 + 2 + 0 / 0 + 0 + 0 ). We simply didn‟t include in our summation
any octal number equivalent at the top of each respective binary 0.

Examples:
1.) 1110001012 =
1112 = 7
0002 = 0
1012 = 5
= 7058
2.) 110.1112 =
110 = 6
111 = 7
= 6.78
3.) 1002 =
100 = 4
= 48

Page 6 of 11
CC113 (A): Introduction to Computing The Computer Number Systems
(from a book of Copernicus P. Pepito)

The Hexadecimal Number System


The actual application of Hexadecimal Number System is in the way how the computer assigned
memory addresses. Memory addresses are the actual memory location where each data is stored
systematically for easy and fast search and retrieval process. Moreover, our data, information,
program, or software are stored in hexadecimal number format. Needless to say, it‟s like Octal
Number System that is used to conserved memory storage space. We have to take note that the
computer system has done many conversion process involving a binary to decimal number
conversion and vise-versa to store, retrieve, manage, and control our data, program, or software.

In computer networking, Hexadecimal Number System is applied as the physical address of the
LAN-card which is called MAC (Media Access Control) address. In other words, each and
every LAN-card in a computer network has a unique MAC address that is in hexadecimal
format. The new IP address scheme in the Internet is also in hexadecimal format. It is the IPv6
(Internet Protocol version 6). The older IP address is expressed in decimal format. The old IP
address scheme was called IPv4(IP version 4).

With this consideration in mind, our learning experience will never go in vain. These reasons are
the very essence why we study this different number system which the computer is using
extensively. The hexadecimal number system consists of ten numbers: 0 to 9 and six letters.
These six letters: A through F are also considered as numerical values. This is a base 16 number
system. The given table that follows is the comparison between the decimal and hexadecimal
numbers. The letter A in hexadecimal is 10, while B is 11, C is 12, and so on.

Decimal Hexadecimal
Number Number
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 A
11 B
12 C
13 D
14 E
15 F
16 10
17 11
18 12

Page 7 of 11
CC113 (A): Introduction to Computing The Computer Number Systems
(from a book of Copernicus P. Pepito)

19 13
20 14
21 15
22 16
23 17
24 18
25 19
26 1A
27 1B
28 1C
29 1D
30 1E
31 1F

A. Decimal To Hexadecimal Number Conversion


To convert a decimal number into hexadecimal number, we simply divide it by 16 and we get the
remainders. The remainders are read in reverse order to get the hexadecimal equivalent numbers.

Examples:
Quotient Remainder
1.) 4210 = ?16

42/16 = 2 10 (is A)
2/16 = 0 2
.
. . 4210 = 2A16

2.) 33810 = ?16

338/16 = 21 2
21/16 = 1 5
1/16 = 0 1
.
. . 33810 = 15216

3.) 2110 = ?16

21/16 = 1 5
1/16 = 0 1
.
. . 2110 = 1516

Page 8 of 11
CC113 (A): Introduction to Computing The Computer Number Systems
(from a book of Copernicus P. Pepito)

B. Hexadecimal To Decimal Number Conversion


To convert hexadecimal number into decimal number, we have to multiply each digit by its
positional notation value. Since we are using letters for 10 up to 15(A to F), we should change A
into 10, and B into 11, and so on and so forth.

Finally, we will compute the sum to get the final answer.

Examples :
1.) 9B516 = ?10
9B516 = 9 x 162 + 11 x 161 + 5 x 160
= 2304 + 176 + 5
= 248510
2.) F1C16 = 15 x 162 + 1 x 161 + 12 x 160
= 3840 + 16 + 12
= 386010
3.) E816 = 14 x 161 + 8 x 160
= 224 + 8
= 23210

C. Hexadecimal To Binary Number Conversion


To convert hexadecimal number into binary number system, simply replace each hexadecimal
number by its 4 binary digit equivalent. Use the given table below as a guide.

Hexadecimal Binary
Number Digit
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001
A 1010
B 1011
C 1100
D 1101
E 1110
F 1111

Page 9 of 11
CC113 (A): Introduction to Computing The Computer Number Systems
(from a book of Copernicus P. Pepito)

Examples :
1.) 3BD616 = ?2

3 = 0011
B = 1011
D = 1101
6 = 0110
.
. . 3BD616 = 00111011110101102

2.) 4F.9A16 = ?2

4 = 0100
F = 1111
9 = 1001
A = 1010
.
. . 4F.9A16 = 01001111.100110102

3.) E716 = ?2

E = 1110
7 = 0111
.
. . E716 = 111001112

Other Solutions
We too, can solve this hexadecimal to binary conversion by using the following technique (like
the way we did in octal to binary conversion):

8 4 2 1 The Hexadecimal Equivalent


1111 The Binary Equivalent

For example, we want to convert a hexadecimal number F to binary number equivalent.


Obviously, we have the answer : 1 1 1 1. Now if you try to analyze the process, you will notice
that we can easily get the answer by adding the hexadecimal number equivalent at the top of
each binary number (8+4+2+1). For example again, we want to convert a hexadecimal number A
to binary number equivalent. We have the answer: 1 0 1 0 since we simply add the hexadecimal
number equivalent of each binary number (8+2). What if we want to convert a hexadecimal
number 8 to its binary number equivalent? Going back to our technique, we will have the answer
: 1 0 0 0 since we add the hexadecimal number equivalent above each binary number (
8+0+0+0). In other words, when we combine the three hexadecimal numbers (FA816), we will
arrive to the answer : 1111 1010 10002. What we did with the excess binary number was to
simply make it a zero number. Now solve it by your own?

Page 10 of 11
CC113 (A): Introduction to Computing The Computer Number Systems
(from a book of Copernicus P. Pepito)

D. Binary To Hexadecimal Number Conversion


To convert binary digit into hexadecimal number, the binary digit is to be grouped by 4 first,
before replacing to its equivalent hexadecimal number. The grouping of 4 digits will start from
the right then to the left. Add zero (at the left side group) to make the digits a multiple of four
when lacking of digit arises. Use the previous table as a guide.

Examples:
1.) 11110102 = ?16
0111 1010 { We add zero at the left side group }
7 A
.
. . 11110102 = 7A16

2.) 1010111110112 = ?16


1010 1111 1011
A F B
.
. . 1010111110112 = AFB2

3.) 00012 = ?16


0001
1
.
. . 00012 = 116

Other Solutions
Now this time we reverse the process by converting the binary number into hexadecimal number
equivalent. Again, we can solve this binary to hexadecimal conversion by using the following
technique (like the way we did in hexadecimal to binary conversion):
8 4 2 1 The Hexadecimal Equivalent
1111 The Binary Equivalent
For example, we want to convert 1111 binary number to hexadecimal number equivalent.
Obviously, we have the answer : F. Now if you try to analyze the process, you could notice that
we can easily get the answer by adding the hexadecimal number equivalent at the top of each
binary number (8+4+2+1 = 15(F)) .
For example again, we want to convert a binary number 1011 to hexadecimal number
equivalent. We have the answer: B since we simply add the hexadecimal number equivalent of
each binary number (8+0+2+1). What if we want to convert a binary number 0011 to its
hexadecimal number equivalent? Going back to our technique, we will have the answer : 3 since
we add the hexadecimal number equivalent above each binary number ( 0+0+2+1). In other
words, when we combine the three groups of binary numbers (1111 1011 00112), we will arrive
to the answer : FB316.
What we did with the excess binary number is to simply make it a zero number. Now
solve it by your own?

Page 11 of 11

You might also like