Download presentation

Presentation is loading. Please wait.

1
**Number System and Codes**

Chapter 3 Number System and Codes

2
**Decimal and Binary Numbers**

3
**Decimal and Binary Numbers**

4
**Converting Decimal to Binary**

Sum of powers of 2

5
**Converting Decimal to Binary**

Repeated Division

6
**Binary Numbers and Computers**

7
Hexadecimal Numbers

8
**Converting decimal to hexadecimal**

9
**Converting binary to hexadecimal**

Converting hexadecimal to binary?

10
Hexadecimal numbers

11
Binary arithmetic Binary addition

12
**Representing Integers with binary**

Some of challenges:- Integers can be positive or negative Each integer should have a unique representation The addition and subtraction should be efficient.

13
**Representing a positive numbers**

14
**Representing a negative numbers using Sign-Magnitude notation**

-5 = bits sign-manitude -55= bits sign-magnitude

15
1’s Complement The 1’s complement representation of the positive number is the same as sign-magnitude. +84 =

16
1’s Complement The 1’s complement representation of the negative number uses the following rule:- Subtract the magnitude from 2n-1 For example: -36 = ??? +36 =

17
1’s Complement Example :- - 57 +57 = -57 =

18
**Converting to decimal format**

19
**2’s Complement For negative numbers:-**

Subtract the magnitude from 2n. Or Add 1 to the 1’s complement

20
Example

21
**Convert to decimal value**

Positive values:- = +89 Negative values

22
**Two's Complement Arithmetic**

23
**Adding Positive Integers in 2's Complement Form**

Overflow in Binary Addition

24
**Overflow in Binary Addition**

25
**Overflow in Binary Addition**

26
**Overflow in Binary Addition**

27
**Adding Positive and Negative Integers in 2's Complement Form**

28
**Adding Positive and Negative Integers in 2's Complement Form**

29
**Subtraction of Positive and Negative Integers**

30
Digital Codes Binary Coded Decimal (BCD)

31
BCD

32
BCD

33
4221 Code

34
Gray Code In pure binary coding or 8421 BCD then counting from 7 (0111) to 8 (1000) requires 4 bits to be changed simultaneously. Gray coding avoids this since only one bit changes between subsequent numbers

35
**Binary –to-Gray Code Conversion**

36
**Gray –to-Binary Conversion**

37
**Gray –to-Binary Conversion**

38
The Excess-3- Code

39
Parity The method of parity is widely used as a method of error detection. Extar bit known as parity is added to data word The new data word is then transmitted. Two systems are used: Even parity: the number of 1’s must be even. Odd parity: the number of 1’s must be odd.

40
**Parity Example: Odd parity Even Parity 110010 110011 11001 111101**

111100 11110 110001 110000 11000

Similar presentations

Presentation is loading. Please wait....

OK

Positional Number Systems

Positional Number Systems

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Converting pdf to ppt online Ppt on 600 mw generators Ppt on classical economics versus Ppt on web designing with html Computer lab rules elementary ppt on cells Ppt on elements of a story Ppt on tcp ip protocol port Plant anatomy and physiology ppt on cells Ppt on weapons of mass destruction song Ppt on as 14 amalgamation