[go: up one dir, main page]

0% found this document useful (0 votes)
12 views8 pages

Number Systems Overview

The document provides an overview of number systems used in computing, including Binary (Base-2), Octal (Base-8), Decimal (Base-10), and Hexadecimal (Base-16), each defined by its unique set of digits and base. It explains how these systems work, their applications, and offers examples of conversions between them. Understanding these number systems is essential for effective computing, as they serve different purposes in data representation and processing.

Uploaded by

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

Number Systems Overview

The document provides an overview of number systems used in computing, including Binary (Base-2), Octal (Base-8), Decimal (Base-10), and Hexadecimal (Base-16), each defined by its unique set of digits and base. It explains how these systems work, their applications, and offers examples of conversions between them. Understanding these number systems is essential for effective computing, as they serve different purposes in data representation and processing.

Uploaded by

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

Number Systems Overview

Number systems are ways to represent numbers


using specific digits. Just like we use 10 digits (0-9)
in the decimal system, computers use different
systems based on different sets of digits.
The most common number systems you'll come
across in computing are:
1.Binary (Base-2)
2.Octal (Base-8)
3.Decimal (Base-10)
4.Hexadecimal (Base-16)
Each number system is based on a different base,
which defines how many digits it can use.

1. Binary System (Base-2)


 Digits Used: 0 and 1.
 How it Works: The binary system uses only
two digits: 0 and 1, which makes it the ideal
system for computers. The reason is that
computers use electrical signals, which can
either be on (1) or off (0).
 Example:
o The binary number 101 means:
1×22+0×21+1×20=51 \times 2^2 + 0 \times
2^1 + 1 \times 2^0 = 51×22+0×21+1×20=5
in decimal.
 Why Remember it: Computers only understand
on and off states, so all data in a computer (like
numbers, characters, images) is stored and
processed in binary form.
 Analogy: Think of it like flipping a light switch.
On (1) and Off (0). Each bit (0 or 1) is like
flipping one switch, and combining several bits
makes more complex data.

2. Octal System (Base-8)


 Digits Used: 0-7.
 How it Works: The octal system uses digits
from 0 to 7. It's often used in computing as a
shorthand for binary numbers because it's more
compact. Each octal digit represents exactly 3
binary digits (bits).
 Example:
o The octal number 12 means:

1×81+2×80=101 \times 8^1 + 2 \times 8^0 =


101×81+2×80=10 in decimal.
In binary, 12 in octal is 1010.
 Why Remember it: Since 3 bits = 1 octal digit,
it’s easier to deal with octal numbers rather than
long strings of binary numbers. It simplifies the
representation.
 Analogy: If binary is like reading a long
sequence of on/off signals, octal is like writing it
in a shorthand, saving space and time.

3. Decimal System (Base-10)


 Digits Used: 0-9.
 How it Works: This is the system you use every
day. It’s called base-10 because it’s based on 10
digits.
 Example:
o The decimal number 345 means:

3×102+4×101+5×100=3453 \times 10^2 + 4


\times 10^1 + 5 \times 10^0 =
3453×102+4×101+5×100=345.
 Why Remember it: Decimal is the most
familiar system to us because it's based on 10—
the number of fingers humans have! We
naturally use it to count, calculate, and
understand measurements.
 Analogy: Decimal is like counting with your
hands—1, 2, 3... up to 9, then you add another
digit.

4. Hexadecimal System (Base-16)


 Digits Used: 0-9, and A-F (where A=10, B=11,
C=12, D=13, E=14, F=15).
 How it Works: The hexadecimal system uses 16
digits. It is often used in computing because it is
more compact and easier to read than binary.
One hexadecimal digit represents exactly 4
binary digits (bits).
 Example:
o The hexadecimal number 2F means:

2×161+15×160=472 \times 16^1 + 15 \times


16^0 = 472×161+15×160=47 in decimal.
In binary, 2F in hexadecimal is 0010 1111.
 Why Remember it: Hexadecimal is used
because it’s easier to represent large binary
numbers in a shorter form. It reduces the
complexity when working with low-level
programming, memory addresses, and color
codes (like in HTML).
 Analogy: Hexadecimal is like shorthand for
binary, where instead of dealing with 8 or more
binary digits, you just use 2 hexadecimal digits.
It’s a more compact way to express what would
otherwise be long binary numbers.

Converting Between Number Systems


Now that you understand the basics, let’s talk about
conversions between these number systems.
1. Binary to Decimal
 Take each binary digit (bit), multiply it by 2
raised to the power of its position (starting
from 0 on the right).
 Example: Convert 1011 to decimal.
1×23+0×22+1×21+1×20=8+0+2+1=111 \times
2^3 + 0 \times 2^2 + 1 \times 2^1 + 1 \times 2^0
=8+0+2+1=
111×23+0×22+1×21+1×20=8+0+2+1=11 in
decimal.
2. Decimal to Binary
 Keep dividing the decimal number by 2,
recording the remainders.
 Example: Convert 13 to binary.
13÷2=613 \div 2 = 613÷2=6 remainder 1
6÷2=36 \div 2 = 36÷2=3 remainder 0
3÷2=13 \div 2 = 13÷2=1 remainder 1
1÷2=01 \div 2 = 01÷2=0 remainder 1
So, 13 in decimal is 1101 in binary.
3. Binary to Hexadecimal
 Group the binary digits in sets of 4, starting from
the right. Add leading zeros if needed.
 Example: Convert 10111011 to hexadecimal.
Grouped as 1011 1011 (B B in hexadecimal), so
it’s BB.
4. Hexadecimal to Binary
 Convert each hexadecimal digit to its 4-bit
binary equivalent.
 Example: Convert A7 to binary.
A in hex is 1010 in binary, and 7 in hex is 0111
in binary.
So A7 in hexadecimal is 1010 0111 in binary.
5. Decimal to Hexadecimal
 Divide the decimal number by 16, recording the
remainders.
 Example: Convert 255 to hexadecimal.
255÷16=15255 \div 16 = 15255÷16=15
remainder 15 (F)
15÷16=015 \div 16 = 015÷16=0 remainder 15
(F)
So, 255 in decimal is FF in hexadecimal.
6. Hexadecimal to Decimal
 Multiply each hexadecimal digit by 16 raised to
the power of its position (starting from 0 on the
right).
 Example: Convert 3F to decimal.
3×161+15×160=48+15=633 \times 16^1 + 15 \
times 16^0 = 48 + 15 =
633×161+15×160=48+15=63 in decimal.

Key Takeaways
 Binary (Base-2): Computers use this because of
their on/off nature (0 and 1).
 Octal (Base-8): A shorthand for binary, groups
3 bits into 1 octal digit.
 Decimal (Base-10): The number system we use
every day.
 Hexadecimal (Base-16): A shorthand for
binary, groups 4 bits into 1 hex digit.
Understanding these number systems is like
knowing the alphabet of computing. Each system
has its use, whether it's simplifying binary, working
with memory, or just counting. The conversions
between these systems help bridge the gap and let
you work effectively in both high-level and low-
level computing tasks.
Analogy: Think of it like different languages—each
one is useful in different situations, but they all
ultimately describe the same thing. You don't have
to memorize everything; you just need to understand
the basic concepts, and with practice, you’ll be able
to convert and use these systems whenever needed.

You might also like