Group 3 - BSCE 2C

Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

]

A Narrative Report on Computer Fundamentals and Programming


First Semester A.Y. 2024 - 2025

NUMBER SYSTEM CONVERSION

Submitted By:

Bernardino, Raven Joy


Butaya, Esjay D.
Magleo, Licole R.
Maraño, Jazsmine Bernadeth P.
Perez, Elaiza Jhoy
Pineda, Art John Paul L.
BSCE - 2C

Submitted to:

ENGR. Kenneth Panahon


Course Instructor

AUGUST 2024
LEARNING OBJECTIVES:
By the end of this lesson, students should able to:
A. Identify the types of number system conversion in terms of calculation;
B. learn how to solve and convert binary, decimal, octal, and hexadecimal;
C. and acknowledge its importance in computer fundamentals, and programming.

A number-based conversation focuses on discussing topics primarily through the lens of numerical
values, statistics, or quantitative data. This can involve:

1. Data Analysis: Discussing data trends, percentages, or statistical results.


2. Financial: Talking about budgets, investments, or economic figures.
3. Quantities: Conversing about measurements, quantities, or numerical comparisons.
4. Performance Metrics: Evaluating performance based on numerical indicators.

There are various types of number systems in mathematics. The four most common number system
types are:
Decimal number system (Base- 10)
Binary number system (Base- 2)
Octal number system (Base-8)
Hexadecimal number system (Base- 16)

Number System Conversion


Numbers can be represented in any of the number system categories like binary, decimal,
hexadecimal, etc. Also, any number which is represented in any of the number system types can be
easily converted to another.

What is number system and its conversion?


A number system is a method to represent numbers mathematically. It can use arithmetic
operations to represent every number uniquely. To represent a number, we convert it requires a base
or radix.
How to do base conversions?
For this, first take the number and then divide it by the given base. Then note down the
remainder obtained after the division. Then, divide the quotient of the division obtained by the given
base.

Number-based conversations often carry significance for several reasons:

1. Quantification and Precision: Numbers provide a precise way to quantify and communicate
information, whether discussing quantities, measurements, or statistical data.

2. Clarity and Objectivity: Using numbers can reduce ambiguity, making discussions clearer and
more objective, especially in fields like science, finance, and engineering.

3. Comparative Analysis: Numbers allow for comparisons and bench-marking, helping to evaluate
performance, trends, and outcomes.

4. Decision Making: Data-driven decisions often rely on numerical information, making numbers
crucial for informed choices and strategic planning.

5. Cultural and Symbolic Meanings: Numbers can also carry cultural, symbolic, or superstitious
meanings, influencing social and personal contexts.

For civil engineering students, number-based conversations are significant for several reasons:
1. Design and Analysis: Civil engineering relies heavily on numerical data for designing structures,
such as calculating loads, stresses, and material requirements. Precise numerical calculations ensure
safety and functionality.

2. Project Management: Budgeting, scheduling, and resource allocation in civil engineering


projects are managed through numerical data. Effective management requires understanding and
interpreting numbers related to costs, timelines, and resources.
3. Structural Performance: Assessing the performance and stability of structures involves
numerical analysis, including load-bearing capacities and stress distribution.

3. Quality Control: Numerical measurements are used to ensure that construction materials and
techniques meet specified standards and tolerances.

4. Environmental Impact: Analyzing environmental data, such as pollution levels and resource
usage, involves numerical analysis to evaluate and mitigate impacts.

6. Communication: Engineers often present data and findings using numbers and statistics.
Effective communication of technical information relies on the ability to interpret and convey
numerical data accurately.

The binary number system is an important aspect of digital computing that functions in a base-2
system having only two numbers; 0 and 1. It is critical for computers and digital devices as they
process information in a manner dependent on

two distinct states; either on (1) or off (0). Knowing how to convert binary numbers into other forms
such as decimal, octal or hexadecimal is useful for different computational purposes.

Binary to Decimal Conversion


Binary-to-decimal conversion refers to translating base-2 numbers into base-10. To demonstrate
this, take for instance the binary number 1101. Converting a binary number to its decimal equivalent
involves expressing the number in terms of base-10.
For example, take the binary number 1101. Here are the steps involved in converting it:

1. Write the binary number: 1101


2. Label each digit's position, starting from the right:

1 x 2^3 = 8
1 x 2^2 = 4
0 x 2^1 = 0
1 x 2^0 = 1

3. Sum the results:


8 + 4 + 0 + 1 = 13

Therefore, binary “1101” equals decimal “13”.

Example:
For the binary number `1101`, the decimal equivalent is calculated as:
1 x 2^3 + 1 x 2^2 + 0 x 2^1 + 1 x 2^0
8 + 4 + 0 + 1 = 13
So, the binary number `1101` is equal to `13` in decimal.

BINARY TO OCTAL
Binary to octal is the process of converting a binary number (base-2) into its equivalent octal
number (base-8).

Here is the step-by-step conversion of binary `1101101` to octal:


1. Write the binary number: `1101101`
2. Group the binary digits into sets of three, starting from the right:
`1 101 101`
(If the leftmost group has fewer than three digits, add leading zeros: `001 101 101`)
3. Convert each group to octal:
- `001` = 1
- `101` = 5
- `101` = 5

4. Combine the octal digits:


Binary `1101101` equals octal `155`.

Example:
1. Binary number: `101110`
2. Group into sets of three:
`101 110`
3. Convert each group to octal:
- `101` = 5
- `110` = 6
4. Combine the octal digits:
Binary `101110` equals octal `56`.

BINARY TO HEXADECIMAL
Binary to hexadecimal conversion is done by grouping binary digits into sets of four and then
converting these groups into their hexadecimal equivalents. Look at the example of binary number
11010110:

Binary Number 11010110


Digits Grouped 1101 0110

Each Group Converted to Hexadecimal:


1101 = D
0110 = 6
Hexadecimal Digits Combined:
Binary 11010110 equals hexadecimal D6.
For another instance, we can convert binary number: 10111011
Grouped in sets of four: 1011 1011

Each Group Converted to Hexadecimal


1011 = B
1011 = B

Combining the Hexadecimal Digits:


Binary is equal to BB.

Without these conversion operations, it would be very difficult to deal with various numbering
systems in computing and digital electronics work practice today.

Decimal to other Number System


In the decimal number system, the numbers are represented with base 10. The way of denoting
the decimal numbers with base 10 is also termed as decimal notation. This number system is
widely used in computer applications. It is also called the base-10 number system which consists of
10 digits, such as, 0,1,2,3,4,5,6,7,8,9. Each digit in the decimal system has a position and every digit
is ten times more significant than the previous digit.

CONVERSION
Convert Decimal to a Binary number.
Subtraction Method

(NOTE: The more familiar you are with the powers of 2 the easier the process.)
Step 1: Start by listing powers of 2 in descending order from left to right
until you reach 1 (e.g., 1,2,4,8,16,32,64, etc.).
Step 2: Identify the largest power of 2 that is less than or equal to the decimal
number.
Step 3: Subtract this power of 2 from your number and record a "1" in that
position. Record "0" for any skipped powers of 2.
Step 4: Continue this process with the remainder until you reach 0.

Example:
1. Convert (75)10 into a binary number.

Solution:

Division Method
To convert a decimal number into an equivalent binary number we have to divide the original
number system by 2 until the quotient is 0, when no more division is possible. The remainder so
obtained is counted for the required number in the order of LSB (Least significant bit) to MSB (most
significant bit).
Example:
1.) Convert (75)10 into a binary number.

Solution:

Convert Decimal to an Octal number.


Here the decimal number is required to be divided by 8 until the quotient is 0. Then, in the same
way, we count the remainder from LSB to MSB to get the equivalent octal number.

Example:

1. ) Convert (394)10 into an octal number.


Solution:

Convert Decimal to a Hexadecimal number.


The given decimal number here is divided by 16 to get the equivalent hex. The division of the number continues
until we get the quotient 0.
Decimal to Hexadecimal Conversion Table

Example:

1.) Convert 47910 to a hexadecimal number.


Solution:

In the decimal to hexadecimal conversion table, the number 15 is considered as the alphabet F and
the number 13 is considered as the alphabet D, while the number 1 is still considered as 1.

Hence, 47910 is equivalent to 1D�10

Octal Number System


Is a number system with base 8 and uses the digits 0 to 7
That means there are only 8 symbols or digits (0, 1, 2, 3, 4, 5, 6, 7) used to form other numbers.
The position of every digit has a value which is a power of 8.

Facts About octal number system


 In 1801, James Anderson criticized the French for basing the metric system on decimal
arithmetic. He suggested the base 8 and he coined the term octal.
 The octal number system is widely used in computer application sectors and digital numbering
systems. The octal number is also used in the aviation sector in the form of a code.
Example:
Octal to Binary:
Convert (242)⁸ into a binary number.
Solution:
2⁸= 010² and 4⁸= 100²
= (242)⁸ = (010100010)²

Octal to Decimal:
Convert octal number (560)⁸ to decimal form.
Solution:
(560)⁸= (5×8²) + (6×8¹) + (0×8⁰)
= (5×64) + (6×8) + (0×1)
= 320+48+0
= 368
(560)⁸ = (368)_{10}

Octal to Hexadecimal:
Convert the octal number (452)⁸ to a hexadecimal number.
First: Convert octal to decimal
(452)⁸ = 4×8² + 5\×8¹ + 2×8⁰
= 4×64 + 5×8 + 2×1
= 256 + 40 + 2
(452)⁸ = (298) _{10}

Second: Convert decimal to Hexadecimal


298/16 = 18, Remainder 10
= 18/16 = 1, Remainder 2
= 1/16 = 0, Remainder 1
10 = A
(452)⁸ = (12A)¹⁶
Hexadecimal
Hexadecimal, often abbreviated as "hex," is a numeral system with a base of 16. It utilizes
sixteen distinct symbols to represent values: the digits 0-9 represent values zero to nine, while the
letters A-F (or a-f) represent values ten to fifteen.

Like binary, decimal, and octal, hexadecimal numbers can also be converted into other number
systems. The process of converting hexadecimal to decimal differs from the remaining one.

Hexadecimal to Decimal Conversion


The process of converting hexadecimal to decimal is the same as binary to decimal. The process
starts from multiplying the digits of hexadecimal numbers with its corresponding positional weights.
And lastly, add all those products.

Example : (����. ��)��

Multiply each digit of 152A.25 with its respective positional weight, and add the products of all the
bits with its weight.

(����. ��)�� = (1×16³)+(5×16²)+(2×16¹)+(A×16^0)+(2×16¯¹)+(5×16¯²)


(����. ��)�� = (1×4096)+(5×256)+(2×16)+(10×1)+(2×16¯¹)+(5×16¯²)
(����. ��)�� =4096+1280+32+10+(2×^1⁄16)+(5×^1⁄256)
(����. ��)�� =5418+0.125+0.125
(����. ��)�� =5418.14453125
= 5418.14453125

Hexadecimal to Binary Conversion


The process of converting hexadecimal to binary is the reverse process of binary to hexadecimal.
We write the four bits binary code of each hexadecimal number digit.
Example: (����. ��)��

Write the four-bit binary digit for 1, 5, A, 2, and 5.

(����. ��)�� = (0001 0101 0010 1010.0010 0101)2

Hexadecimal to Octal Conversion


Two steps required to convert Hexadecimal to Octal:

1. Find the binary equivalent of the hexadecimal number.


2. Make the pairs of three bits on both sides of the binary point. If there will be one or two bits left in
a pair of three bits pair, add the required number of zeros on extreme sides and write the octal digits
corresponding to each pair.

Example 1: (����. ��)��

(����. ��)�� = (0001 0101 0010 1010.0010 0101)2


001 010 100 101 010.001 001 010
(001010100101010.001001010)2=(12452.112)8

So, the octal number of the hexadecimal number 152A.25 is 12452.112


References:

https://www.javatpoint.com/conversion-of-number-system-in-digital-electronics?fbclid=IwY2xjawE
xgKhleHRuA2FlbQIxMAABHaWDzqxv68go2C2EiFck9oV1-OBpT0u3lP8UW3sDa3xRmPNvYC9
S29-m-Q_aem_DJNJ530Q-I4QpvjxfKftVw

https://byjus.com/maths/number-system/?fbclid=IwY2xjawExgKtleHRuA2FlbQIxMAABHTxSpjcQ
UFoGcKXLHjBZBDVSWwyty5rdPgbmIVrHAOxHFR7TYStLLvMxTQ_aem_eXtKYyDtVJEZNU
VLfADNnA

https://www.splashlearn.com/math-vocabulary/octal-number-system?fbclid=IwY2xjawExgLRleHRu
A2FlbQIxMAABHcvyQJam1Prv6o26QFjopAy0ux7zD39PO3WPPfPuzK9muOwCRF_YpERdgQ_
aem_RQl8MwV1ycB1NPGBHZO-kw#:~:text=A%20number%20system%20with%20base%208%2
0is%20called%20an%20octal,8%20%2C%2056%208%20%2C%20etc

You might also like