CS 1111-01 - AY2025-T4
Assignment Activity Unit 2
Understanding Number Systems and Coding Representations in Technology
In the tech world, especially in software development, we often work with different
number systems and coding methods. These help computers and devices understand,
process, and share data. In this assignment, I’ll explain how to convert decimal numbers
to binary, octal, and hexadecimal formats. I’ll also talk about why this is important in
real-life projects, and when and why we use different coding representations like ASCII,
Unicode, and BCD.
Step-by-Step Conversion Example
Let’s say the first three digits of my birthdate are 281. I’ll now show how to convert this
decimal number to binary, octal, and hexadecimal.
1. To Binary (base 2):
We divide 281 by 2 over and over, keeping the remainders:
281 ÷ 2 = 140 remainder 1
140 ÷ 2 = 70 remainder 0
70 ÷ 2 = 35 remainder 0
35 ÷ 2 = 17 remainder 1
17 ÷ 2 = 8 remainder 1
8 ÷ 2 = 4 remainder 0
4 ÷ 2 = 2 remainder 0
2 ÷ 2 = 1 remainder 0
1 ÷ 2 = 0 remainder 1
Reading from the bottom up, the binary number is 100011001.
2. To Octal (base 8):
281 ÷ 8 = 35 remainder 1
35 ÷ 8 = 4 remainder 3
4 ÷ 8 = 0 remainder 4
Reading from bottom to top: 431
3. To Hexadecimal (base 16):
281 ÷ 16 = 17 remainder 9
17 ÷ 16 = 1 remainder 1
1 ÷ 16 = 0 remainder 1
Reading from bottom to top: 119
Why Converting Number Systems is Important
In technology, especially when dealing with low-level programming, devices, or memory
storage, it’s important to understand different number systems. Computers use binary to
process data, while hexadecimal makes it easier for humans to read and debug binary
code. Octal is sometimes used in permissions and older systems.
When you know how to convert between number systems, you can work more
confidently with things like machine code, color codes, and IP addresses. It also helps
when debugging software or communicating with hardware components.
Why might it be necessary to use different coding representations like ASCII
In software projects, we don’t just deal with numbers—we also deal with characters and
symbols. That’s where coding systems like ASCII, Unicode, and BCD come in.
- ASCII is good for simple English text.
- Unicode supports many world languages and symbols, making it great for global apps.
- BCD (Binary-Coded Decimal) is useful when we want to store decimal numbers
accurately, like in banking systems.
The choice depends on the type of data you’re working with. If your app needs to support
many languages, go with Unicode. If it’s dealing with prices or precise decimal values,
BCD might be better.
Example of Choosing the Right Representation
Imagine you’re making software for an international bank. Using ASCII might work for
English users, but what if a customer from Japan or Nigeria tries to input their name in
their local language? If the app doesn’t support Unicode, the characters won’t display
properly, and it could cause confusion or even data errors. This could hurt the company’s
reputation and make the app unusable for many people.
Comparing Different Coding Methods
Code Type Character Support Common Use Notes
ASCII 128 characters English Text Simple to use
Unicode 143 + symbols Global App Support many
languages
BCD 0-9 digits Financial data Accurate for
decimals
EBCDIC 256 characters IBM systems Mostly old/ legacy
systems
Gray code Binary transitions Digital hardware Reduce errors in
signals
Best Choice for the Project
For the project mentioned in the scenario, I would recommend using Unicode. It supports
all kinds of characters, works well with different devices, and helps ensure that data is
interpreted the same way everywhere. If precise decimal numbers are involved, BCD can
be added where needed.
Conclusion
Understanding number systems and coding formats helps us write better software and
communicate clearly with computers and devices. Choosing the right format saves time,
avoids errors, and helps your software work well across many platforms and languages.
References
Ndjountche, T. (2016). Digital electronics 1: Combinational logic circuits. John Wiley &
Sons, Incorporated.
Forouzan, B. A. (2013). Data communications and networking (5th ed.). McGraw-Hill
Education.
Stallings, W. (2017). Computer organization and architecture: Designing for
performance (10th ed.). Pearson.