0% found this document useful (0 votes)
11 views13 pages

Unit 2 - 2.1 Number System

The document provides an overview of number systems, focusing on binary (Base-2) and decimal (Base-10) systems, including their representations and conversions. It explains why computers use binary, the structure of various number systems, and methods for converting between binary and decimal formats. Additionally, it highlights the use of octal and hexadecimal systems for simplifying binary representation in computing.

Uploaded by

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

Unit 2 - 2.1 Number System

The document provides an overview of number systems, focusing on binary (Base-2) and decimal (Base-10) systems, including their representations and conversions. It explains why computers use binary, the structure of various number systems, and methods for converting between binary and decimal formats. Additionally, it highlights the use of octal and hexadecimal systems for simplifying binary representation in computing.

Uploaded by

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

Unit-2_1

COMPUTER ORGANIZATION AND ARCHITECTURE

Topic: Number System

1
Objectives

•Understand why computers use binary (Base-2) numbering.

•Understand how to convert Base-2 numbers to Base-10.

•Understand how to convert Base-10 numbers to Base-2 .

2
Why Binary System?

Computers are made of a series of switches

Each switch has two states: ON or OFF

Each state can be represented by a number – 1 for “ON”


and 0 for “OFF”

3
• Number systems include decimal, binary, octal and hexadecimal
• Each system have four number base

Number Base Symbol


System
Binary Base 2 B

Octal Base 8 O

Decimal Base 10 D

Hexadecimal Base 16 H

4
Decimal Number System

• The Decimal Number System uses base 10. It includes the digits {0, 1,2,…, 9}.
• The weighted values for each position are:

Base

10^4 10^3 10^2 10^1 10^0 10^-1 10^-2 10^-3

10000 1000 100 10 1 0.1 0.01 0.001


5

left of the decimal point Right of decimal point

5
• Each digit appearing to the left of the decimal point represents a value between zero and nine ti
power of ten represented by its position in the number.
• Digits appearing to the right of the decimal point represent a value between zero and nine mes
an increasing negative power of ten.

Example: the value 725.194 is represented in expansion form as follows:

= 7 * 10^2 + 2 * 10^1 + 5 * 10^0 + 1 * 10^-1 + 9 * 10^-2 + 4 * 10^-3

= 7 * 100 + 2 * 10 + 5 * 1 + 1 * 0.1 + 9 * 0.01 + 4 * 0.001

= 700 + 20 + 5 + 0.1 + 0.09 + 0.004

= 725.194

6
The Binary Number Base Systems

• Most modern computer system using binary logic. The computer represents values(0,1) using
two voltage levels (usually 0V for logic 0 and either +3.3 V or +5V for logic 1).

• The Binary Number System uses base 2 includes only the digits 0 and 1

• The weighted values for each position are :

Base

2^5 2^4 2^3 2^2 2^1 2^0 2^-1 2^-2

32 16 8 4 2 1 0.5 0.25

7
Number Base Conversion

• Binary to Decimal: multiply each digit by its weighted position, and add each of the weighted
values together or use expansion form directly.

• Example the binary value 1100 1010 represents :

1100 1010 = 1*2^7 + 1*2^6 + 0*2^5 + 0*2^4 + 1*2^3 + 0*2^2 + 1*2^1 + 0*2^0

= 1 * 128 + 1 * 64 + 0 * 32 + 0 * 16 + 1 * 8 + 0 * 4 + 1 * 2 + 0 * 1

= 128 + 64 + 0 + 0 + 8 + 0 + 2 + 0 =202

8
• Decimal to Binary
There are two methods, that may be used to convert from integer number in decimal form to binary
form:
1-Repeated Division By 2
• For this method, divide the decimal number by 2,
• If the remainder is 0, on the right side write down a 0.
• If the remainder is 1, write down a 1.
• When performing the division, the remainders which will represent the binary equivalent of the
decimal number are written beginning at the least significant digit (right) and each new digit is
written to more significant digit (the left) of the previous digit.

9
• Example: convert the number 333 to binary.
Division Quotient Remainder Binary
333/2 166 1 LSB 1
166/2 83 0 01
83/2 41 1 101
41/2 20 1 1101
20/2 10 0 01101
10/2 5 0 001101
5/2 2 1 1001101
2/2 1 0 01001101
1/2 0 1 MSB 101001101

10
Converting Base-2 to Base-10

(1 0 0 1 1)

OFF

OFF
ON/OFF

ON

ON

ON
Exponent: 24 23 22 21 2
0
2

Calculation:
16 0 0 2 1
+ + + + =

(19)10
11

11
Other Number Systems

• Octal and hex are a convenient way to represent binary numbers, as used by computers.

• This is especially helpful when we have to do fairly complicated tasks using numbers

• Computer mechanics often need to write out binary quantities, but in practice writing out a binary number
such as 1001001101010001 is tedious, and prone to errors.
• Therefore, binary quantities are written in a base-8 ("octal") or, much more commonly, a base-16
("hexadecimal" or "hex") number format.

12
THANK YOU

13

Vishwakarma Institute of Technology, Pune

You might also like