0% found this document useful (0 votes)
10 views21 pages

03 Number System

The document provides an overview of various number systems including decimal, binary, octal, and hexadecimal, explaining their bases, symbols, and applications. It details the positional notation used in these systems and includes methods for converting between them. Understanding these number systems is essential for effectively working with digital data and programming.

Uploaded by

jinay.s5
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)
10 views21 pages

03 Number System

The document provides an overview of various number systems including decimal, binary, octal, and hexadecimal, explaining their bases, symbols, and applications. It details the positional notation used in these systems and includes methods for converting between them. Understanding these number systems is essential for effectively working with digital data and programming.

Uploaded by

jinay.s5
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/ 21

Number Systems

ENR107 – W2025
Maryam Kaveshgar
NUMBER SYSTEM
 A number system represents and expresses quantities using numerical symbols, which provides a
structured way to count, measure, calculate, and communicate numerical values.

 Base: Each number system has a base or radix, which determines the number of unique symbols
(digits) it uses. For example, the decimal system has a base of 10 (0 to 9), binary has a base of 2 (0 and
1), and hexadecimal has a base of 16 (0 to 9 and A to F).

 Positional Notation: Most number systems use positional notation, where the value of a digit
depends on its position in the number. The position of a digit represents a power of the base, starting
from zero and increasing to the left.
Is there any non positional number
DD
system?

Understanding different number systems is essential as it allows us to represent information in more


efficient ways and work with digital data effectively.
DECIMAL NUMBER SYSTEM
 Most widely used number system in our daily lives.

 Also known as the base-10 number system since it uses ten digits: 0, 1, 2, 3, 4, 5, 6, 7, 8,
and 9.

 Each digit's position in a decimal number has a weight based on powers of 10, making it a
positional notation system.

4672.6789
103 10-4
102 10-3
101 10-2
100 10-1

 The simplicity and ease of use contribute to the widespread use of the decimal number
system in the modern world.
BINARY NUMBER SYSTEM

 The binary number system is used for representing and processing data in computers and other
digital devices.

 The binary system uses only two digits: 0 and 1. Each digit is called a "bit" (short for binary digit).

 Base-2 number system (uses powers of 2 for positional notation).

10101

24 22 20
23 21

 The binary number system is ideally suited for digital electronics because it can be easily
represented using electrical states (ON/OFF) or magnetic polarities (NORTH/SOUTH).
OCTAL NUMBER SYSTEM
 The octal number system is less commonly used than decimal and binary but finds important
applications in specific areas of computer science and electronics.

 It is a base-8 number system, meaning it uses eight digits: 0, 1, 2, 3, 4, 5, 6, and 7.

 Octal is commonly used in low-level programming languages for specific tasks.

 In some programming languages, such as C and its derivatives, octal notation is used to
represent special characters.
HEXADECIMAL NUMBER SYSTEM
 The hexadecimal number system is widely used in computer programming, digital systems, and
networking.

 It is a base-16 number system, using sixteen digits: 0 to 9 and A to F, where A represents 10, B
represents 11, and so on up to F representing 15.

 The hexadecimal number system is ideally suited for representing and working with binary data
in a concise and human-readable format.

 It provides a compact representation for large binary numbers, making it easier to manage and
communicate.

 Applications – Computer memory address, Color representation, Character encoding, Network


addresses.
NUMBER SYSTEM

SYSTEM BASE SYMBOLS


Decimal 10 0,1,2,………9
Binary 2 0,1
Octal 8 0,1,2,…….7
Hexadecimal 16 0,1,……9, A, B,…..F

 Number of digits that are being used for data representation are very important. For example, we can
represent 0-999 with 3 digits, 0-9999 with 4 digits in decimal number system.

 A 16-bit processor can handle 16-bit of data. Can we use base-1


number system?
NUMBER SYSTEM
Decimal Binary Octal Hexadecimal
0 0 0 0
1 1 1 1
2 10 2 2
3 11 3 3
4 100 4 4
5 101 5 5
6 110 6 6
7 111 7 7
8 1000 10 8
9 1001 11 9
10 1010 12 A
11 1011 13 B
12 1100 14 C
NUMBER SYSTEM

Decimal Binary Octal Hexadecimal


13 1101 15 D
14 1110 16 E
15 1111 17 F
16 10000 20 10
CONVERSIONS AMONG BASES

Decimal Octal

Binary Hexadecimal

2610 = 110102 = 328 = 1A16


BINARY TO DECIMAL
 Multiply each bit by 2n, where n is the weight of the bit.

 Weight is the position of the bit, starting from 0 on the right.

 Add the results.

Example 1010112 - 1 * 20 = 1
1 * 21 = 2
0 * 22 = 0
1 * 23 = 8
0 * 24 = 0
1 * 25 = 32
Total - 4310
OCTAL TO DECIMAL
 Multiply each bit by 8n, where n is the weight of the bit.

 Weight is the position of the bit, starting from 0 on the right.

 Add the results.

Example 6248 - 4 * 80 = 4
2 * 81 = 16
6 * 82 = 384
Total - 40410
HEXADECIMAL TO DECIMAL
 Multiply each bit by 16n, where n is the weight of the bit.

 Weight is the position of the bit, starting from 0 on the right.

 Add the results.

Example ABC16 - C * 160 = 12


B * 161 = 176
A * 162 = 2560
Total - 274810
DECIMAL TO BINARY

 Keep dividing by 2 and note down the remainders.

 First remainder is bit 0 (LSB).

 Second remainder is bit 1st bit and so on.

Example 43810 - 2 438


2 219 - 0
2 109 – 1
2 54 - 1
2 27 - 0
2 13 - 1
2 6-1
2 3-0
2 1–1
2 0–1 - 1101111102
DECIMAL TO BINARY
 To convert fractional part into binary, multiply by 2.

 Note down the integer part (before decimal) and multiply the rest by 2.

 Continue until the fraction part is zero.

 The first integral bit is MSB and so on.

Example 4.12510 - 2 4 0.125 * 2 = 0.250 Integer part - 0


2 2–0 0.250 * 2 = 0.500 Integer part - 0
2 1- 0 0.500 * 2 = 1.000 Integer part - 1
2 0- 1

Answer – 100.0012
OCTAL TO BINARY

1. Convert to Decimal and then execute decimal to binary conversion.

2. Convert each octal digit to 3 bit binary representation.

4 5 78

100 101 111 - 1001011112


HEXADECIMAL TO BINARY

1. Convert to Decimal and then execute decimal to binary conversion.

2. Convert each hexadecimal digit to 4 bit binary representation.

4 5 716

0100 0101 0111 - 0100010101112


DECIMAL TO OCTAL

 Keep dividing by 8 and note down the remainders.

 First remainder is bit 0 (LSB).

 Second remainder is bit 1 and so on.

Example 123410 - 8 1234


8 154 - 2
8 19 – 2
8 2-3
8 0–2 - 23228
BINARY TO OCTAL

 Group bits in 3 and convert to octal digits.

101101102 10 110 110

2 6 6 - 2668

HEXADECIMAL OCTAL
 Use binary as intermediary.

A1516 - 1111 0001 0101


Make groups of three bits - 111 100 010 101
7 4 2 5 - 74258
DECIMAL TO HEXADECIMAL

 Keep dividing by 16 and note down the remainders.

 First remainder is bit 0 (LSB).

 Second remainder is bit 1 and so on.

Example 123410 - 16 1234


16 77 - 2
16 4 – 13 - D
16 0–4 - 4D216

BINARY TO HEXADECIMAL
 Group bits in 4 and convert to hexa digits. 1010111002 - 1 0101 1100

1 5 C - 15C16
DECIMAL TO HEXADECIMAL

 (243)10 = ()2

 (1973)10 = ()16

 (247)8 = ()10

 (1110101101101)2 = ()10

 (B2E)16 = ()2 = ()8 = ()10

You might also like