Nicdao Ict Module
Nicdao Ict Module
Nicdao Ict Module
Livelihood Education
Quarter 1 — Module 1:
INFORMATION AND
COMMUNICATION
TECHNOLOGY
Module 1: 4 TYPES OF
NUMERICAL SYSTEM:
BINARY, DECIMAL,
HEXADECIMAL, OCTAL.
MODULE CONTENT
LESSON 1# BINARY
TOPICS:
1.) WHAT IS BINARY
2.) BINARY TO DECIMAL
3.) BINARY TO HEXADECIMAL
4.) BINARY TO OCTAL
LESSON 2# DECIMAL
TOPICS:
1.) WHAT IS DECIMAL
2.) DECIMAL TO BINARY
3.) DECIMAL TO HEXA
4.) DECIMAL TO OCTAL
LESSON 3# HEXADECIMAL
TOPICS:
1.) WHAT IS HEXADECIMAL
2.) HEXA TO BINARY
3.) HEXA TO DECIMAL
4.) HEXA TO OCTAL
LESSON 4# OCTAL
1.) WHAT IS OCTAL
2.) OCTAL TO BINARY
3.) OCTAL TO DECIMAL
4.) OCTAL TO HEXA
LESSON 1: BINARY
TOPIC NO.1
What is Binary?
Binary in ICT refers to the binary number system, which is a base-2 system
used in computers and digital electronics. It uses only two digits, 0 and 1, to
represent all numbers and data. In binary, each digit is called a bit, and a group of 8
bits is called a byte. By using combinations of 0s and 1s, binary is able to represent
and manipulate data in a way that computers can understand and process.
How Binary Representation is used to store and process various types of data
in computer? In computers, binary representation is used to store and process
various types of data through a system called encoding. Different types of data, such
as numbers, text, images, and audio, are all converted into binary code before being
stored and processed.
For example, let's say we have the number 123. In binary, it would be
represented as 1111011.
Each digit in the binary representation corresponds to a power of 2. Starting from the
rightmost digit, we have 2^0 (1), 2^1 (2), 2^2 (4), 2^3 (2^4 (16), 2^5 (32), and 2^6
(64). By adding up the powers of 2 where the corresponding binary digit is 1, we get
the decimal value 123.
Similarly, text characters can be encoded using binary codes. For example, the letter
'A' can be represented as 01000001 in ASCII encoding. By mapping each character
to its corresponding binary code, we can store and process entire strings of text in
binary form.
Images and audio can also be converted into binary representations. In digital
images, each pixel is assigned a binary code that represents its color or intensity.
Similarly, in digital audio, sound waves are sampled at regular intervals, and each
sample is represented by a binary code. Once data is stored in binary form,
computers can perform various operations on it using logic gates and circuits. These
operations include arithmetic computations, logical operations, comparisons, and
more. The binary nature of data allows for efficient processing and manipulation by
computers.
TOPIC NO.2
Binary to Decimal
1 * 2^3 = 1 * 8 = 8
0 * 2^2 = 0 * 4 = 0
1 * 2^1 = 1 * 2 = 2
0 * 2^0 = 0 * 1 = 0
1 * 2^0 = 1 * 1 = 1
0 * 2^1 = 0 * 2 = 0
1 * 2^2 = 1 * 4 = 4
0 * 2^3 = 0 * 8 = 0
1 * 2^4 = 1 * 16 = 16
0 * 2^5 = 0 * 32 = 0
Let's say we have the binary number 101010. To convert it to decimal, we start from
the rightmost digit and assign each digit a weight based on its position.
For example:
1 * 2^0 = 1 * 1 = 1
0 * 2^1 = 0 * 2 = 0
1 * 2^2 = 1 * 4 = 4
0 * 2^3 = 0 * 8 = 0
1 * 2^4 = 1 * 16 = 16
0 * 2^5 = 0 * 32 = 0
TOPIC NO.3
Binary to Hexadecimal
Grouping the binary digits into sets of four:1010 1010Converting each group to its
corresponding hexadecimal digit:1010 is equivalent to A in hexadecimal1010 is also
equivalent to A in hexadecimal So, the binary number 10101010 is equivalent to the
hexadecimal number AA.
TOPIC NO.4
Binary to Octal
Binary and octal are two different numerical systems used in computing. Binary is a
base-2 system, meaning it uses only two digits, 0 and 1, while octal is a base-8
system, meaning it uses 8 digits, 0 to 7. Converting a binary number to octal involves
grouping the binary digits into sets of three and then replacing each set with its
corresponding octal digit.
1. Group the binary digits into sets of three, starting from the right. If the last group
has less than three digits, add leading zeros to make it a complete group.
2. Write down the octal digit for each group of three binary digits. Here's a quick
reference for the conversion:
3. Arrange the octal digits in the same order as they were derived from the binary
number. Let's go through an example: Suppose we want to convert the binary
number 110101101 to octal.
Step 1: Group the binary digits into sets of three:001 101 011
Step 3: Arrange the octal digits in the same order:153So, the octal equivalent of the
binary number 110101101 is 153.
LESSON 2: DECIMAL
TOPIC NO.1
Decimal
Decimal is a base-10 numbering system and a way of representing numbers using the digits 0 through 9. Each
digit's value is based on its position within the number.
The rightmost digit represents ones, the next digit to the left represents tens, the next represents hundreds, and so
on, with each position representing a power of 10.In information and communication technology (ICT), decimal is
important for several reasons:
1. Human readability: Decimal is the numbering system most commonly used by humans, making it easy to
understand and work with. It is the system we use for our everyday counting, measuring, and calculating, making it
a natural choice for representing numerical data in ICT for human consumption.
2. Real-world applications: Decimal is commonly used in ICT to represent quantities that are traditionally expressed
in base-10 units, such as currency, measurements, and most everyday calculations. For example, in a financial
application, decimal numbers are used to represent currency values like dollars and cents.
3. Interoperability: Decimal numbers are easily understood by people from all cultures and backgrounds, making
them a universal choice for representing numerical data in ICT. This simplifies data exchange and communication
between different systems and users.
4. Compatibility: Many ICT systems, including programming languages, databases, and software applications,
natively support decimal numbers. As a result, decimal is widely used as the standard for representing and
processing numerical data across various ICT platforms.
5. Precision: In many ICT applications, precise and accurate numerical representation is crucial. Decimal provides
a familiar and straightforward way to represent and manipulate such data while maintaining the expected level of
precision in calculations.
In summary, decimal is important in ICT due to its compatibility with human understanding, real-world applicability,
interoperability, compatibility with existing systems, and precision in representing numerical data. Its widespread
use in everyday life and across various ICT platforms makes it an essential element of modern digital systems and
applications.
TOPIC NO.2
DECIMAL TO BINARY
Converting a decimal number to binary involves representing the decimal number in base-2 form. Here's how it's
done:
2. Divide the decimal number by 2 and record the remainder. This gives you the least significant bit of the
binary number.
3. Divide the quotient from the previous step by 2 and record the remainder. Repeat this process, recording
remainders from each division, until the quotient becomes 0.
4. 4. The remainders, read in reverse order, give you the binary representation of the decimal number.For
example, let's convert the decimal number 25 to binary:
Step 1:
Divide 25 by 2. The remainder is 1. The quotient is 12
.Step 2:
Divide 12 by 2. The remainder is 0. The quotient is 6.
Step 3:
Divide 6 by 2. The remainder is 0. The quotient is 3.
Step 4:
Divide 3 by 2. The remainder is 1. The quotient is 1.
Step 5:
Divide 1 by 2. The remainder is 1. The quotient is 0.
Reading the remainders in reverse order (1, 1, 0, 0, 1) gives the binary representation of 25, which is
11001.
Decimal to Hexadecimal
Converting a decimal number to hexadecimal involves dividing the decimal number by 16 repeatedly and noting the
remainders. Here's a step-by-step process:
decimal_number = 255
hexadecimal_equivalent = hex(decimal_number).lstrip('0x').upper()
print (f" The hexadecimal equivalent of {decimal_number} is: {hexadecimal_equivalent}")
This code uses the built-in hex function in Python, which converts a decimal number to its hexadecimal
representation.
The lstrip ('0x') is used to remove the '0x' prefix that hex adds, and upper() is used to convert the result to
uppercase.
TOPIC NO.4
Decimal to Octal
Converting a decimal number to octal involves dividing the decimal number by 8 repeatedly and noting the
remainders.
Here's a step-by-step process:
decimal_number = 27
octal_equivalent = oct(decimal_number).lstrip('0o')
print(f"The octal equivalent of {decimal_number} is: {octal_equivalent}")
LESSON 3:HEXADECIMAL
TOPIC NO.1
Hexadecimal
In the context of information and communication technology (ICT), hexadecimal (often abbreviated as hex) is a
base-16 numeral system.
It is widely used in computing and digital electronics as a convenient way to represent binary-coded values.
Here are key points related to hexadecimal in the context of ICT:Base-16 Representation: Hexadecimal is a
positional numeral system with a base of 16.
It uses the digits 0-9 and the letters A-F (or a-f) to represent values.
The reason for using letters is to represent values greater than 9 in a single digit.Binary Conversion:
Memory Addresses: In programming and system architecture, memory addresses are often represented in
hexadecimal.
For example, memory addresses in a computer's RAM or storage devices are commonly expressed in
hexadecimal notation.Color Representation:
In graphics and web development, hexadecimal is frequently used to represent colors. A color in hexadecimal
notation is typically expressed as a six-digit code, where the first two digits represent the red component, the next
two represent green, and the last two represent blue (RGB color model).
Example:
The hexadecimal color code #FF0000 represents pure red (255 in red, 0 in green, and 0 in blue).
ASCII Representation: Hexadecimal is also used to represent characters in the ASCII (American Standard Code for
Information Interchange) character encoding.
Each ASCII character is assigned a unique hexadecimal value.
In summary, hexadecimal plays a crucial role in ICT for representing binary-coded information in a more readable
and compact form.
It is commonly used in programming, memory addressing, color representation, and other areas of computing.
LESSON NO.2
Hexadecimal to Binary
Converting a hexadecimal number to binary involves converting each hexadecimal digit to its equivalent 4-bit binary
representation. Each hexadecimal digit corresponds to a group of 4 bits in binary.
Write down the 4-bit binary representation for each hexadecimal digit.
0 in hex is 0000 in binary.
1 in hex is 0001 in binary.
2 in hex is 0010 in binary.
3 in hex is 0011 in binary.
4 in hex is 0100 in binary.
5 in hex is 0101 in binary.
6 in hex is 0110 in binary.
7 in hex is 0111 in binary.
8 in hex is 1000 in binary.
9 in hex is 1001 in binary.
A in hex is 1010 in binary.
B in hex is 1011 in binary.
C in hex is 1100 in binary.
D in hex is 1101 in binary.
E in hex is 1110 in binary.
F in hex is 1111 in binary.
Replace each hexadecimal digit with its binary equivalent.For example, if you have the hexadecimal number 1A3,
replace '1' with 0001, 'A' with 1010, and '3' with 0011.
Combine the binary representations.For the example 1A3, the binary equivalent is 0001 1010 0011.
LESSON NO.3
Hexadecimal to Decimal
To convert a hexadecimal number to binary manually, you can follow these steps:
Write down the 4-bit binary representation for each hexadecimal digit.
Replace each hexadecimal digit with its binary equivalent.
Combine the binary representations.
Let's take an example:
Convert the hexadecimal number 1A3 to binary.
Let's take an example and convert a hexadecimal number to its decimal equivalent.
Consider the hexadecimal number 1A3:
LESSON NO.4
Hexadecimal to Octal
To convert a hexadecimal number to octal, you can first convert it to binary and then from binary to octal.
Here's the step-by-step process:
LESSON 4: OCTAL
TOPIC NO.1
Octal
In information and communication technology (ICT), octal is a numeral system with a base of 8.
The octal system uses the digits 0 through 7 to represent values, and each digit in an octal number corresponds to
a group of three binary digits (bits). Octal is less commonly used in modern computing compared to binary and
hexadecimal, but it still has historical significance.
Here are some key points about octal in the context of ICT:
1. Base-8 Representation: Octal is a positional numeral system, and each place value represents a power of
8. The rightmost digit represents8080(1), the next digit to the left represents8181(8), the next
represents8282(64), and so on.
2. Binary Relationship: Each octal digit corresponds to a unique combination of three binary digits.
For example:
0 in octal is 000 in binary.
1 in octal is 001 in binary.
2 in octal is 010 in binary.
3 in octal is 011 in binary.
4 in octal is 100 in binary.
5 in octal is 101 in binary.
6 in octal is 110 in binary.
7 in octal is 111 in binary.
3. Historical Usage: Octal was more commonly used in early computing systems because it aligns well with
the word sizes of certain computer architectures.
For example, early mainframe computers often had word sizes that were multiples of 3, making octal a
natural choice for representing data.
4. Address Representation: In some computer architectures, memory addresses and values were represented
in octal. For instance, the PDP-8, a historic minicomputer, used octal extensively in its assembly language
and memory representation.
5. Limited Modern Use: With the prevalence of binary and hexadecimal representation, octal is less commonly
used in modern computing.
Hexadecimal is often preferred when a more compact representation is needed.
In summary, octal has historical significance in the early days of computing, but its usage has diminished
over time, and it is not as prevalent in contemporary ICT as binary or hexadecimal.
TOPIC NO.2
Octal to Binary
Converting an octal number to binary involves replacing each octal digit with its 3-bit binary equivalent.
Here's a step-by-step process:
Write down the 3-bit binary representation for each octal digit.
TOPIC NO.3
Octal to Decimal
Converting an octal number to decimal involves interpreting each digit in the octal number as a multiple of powers
of 8 and then summing these values.
The positional values in octal are powers of 8, starting from the rightmost digit as 8^0, 8^1, 8^2, and so on.
TOPIC NO. 4
Octal to Hexadecimal
To convert an octal number to hexadecimal, you can first convert it to binary and then from binary to
hexadecimal. Here's the step-by-step process:
1. Convert Octal to Binary:
Replace each octal digit with its 3-bit binary equivalent.
2. Group Binary Digits into Sets of 4:
Starting from the right, group the binary digits into sets of four.
3. Convert Each Group to Hexadecimal:
Replace each group of 4 binary digits with its hexadecimal equivalent.
References
ELECTRONIC RESOURCES
https://byjus.com/maths/number-system/#:~:text=Computer%20Numeral%20System%20(Number
%20System%20in%20Computers)&text=In%20general%2C%20the%20binary%20number,systems
%20are%20also%20used%20sometimes.
https://www.toppr.com/guides/computer-aptitude-and-knowledge/basics-of-computers/number-systems/
https://www.tutorialspoint.com/computer_fundamentals/computer_number_system.htm