Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 1 Number System RGGP, Narwana.

Similar presentations


Presentation on theme: "Chapter 1 Number System RGGP, Narwana."— Presentation transcript:

1 Chapter 1 Number System RGGP, Narwana

2 CHAPTER 1 PREVIEW Counting in Decimal and Binary Place Value
Binary to Decimal Conversion Decimal to Binary Conversion Electronic Translators Hexadecimal Numbers Octal Numbers

3 COUNTING IN DECIMAL AND BINARY
Number System - Code using symbols that refer to a number of items. Decimal Number System - Uses ten symbols (base 10 system) Binary System - Uses two symbols (base 2 system)

4 Introduction to Numbering Systems
We are all familiar with the decimal number system (Base 10). Some other number systems that we will work with are: Binary  Base 2 Octal  Base 8 Hexadecimal  Base 16

5 PLACE VALUE Numeric value of symbols in different positions.
Example - Place value in binary system: Place Value 8s 4s 2s 1s Binary Yes Yes No No Number 1 1 RESULT: Binary 1100 = decimal = decimal 12

6 BINARY TO DECIMAL CONVERSION
Convert Binary Number to a Decimal Number: Binary Decimal = 51

7 TEST 9 Binary 1001 = 15 Binary 1111 = 2 Binary 0010 =
Convert the following binary numbers into decimal numbers: 9 Binary = 15 Binary = 2 Binary =

8 DECIMAL TO BINARY CONVERSION
Divide by 2 Process Decimal # 13 ÷ 2 = remainder 1 6 ÷ 2 = 3 remainder 0 3 ÷ 2 = 1 remainder 1 1 ÷ 2 = 0 remainder 1 1 1 1

9 Convert the following decimal numbers into binary:
TEST Convert the following decimal numbers into binary: 1011 Decimal = 0100 Decimal = 10001 Decimal =

10 HEXADECIMAL NUMBER SYSTEM
Uses 16 symbols -Base 16 System 0-9, A, B, C, D, E, F Decimal 1 9 10 15 16 Binary 0001 1001 1010 1111 10000 Hexadecimal 1 9 A F 10

11 HEXADECIMAL AND BINARY CONVERSIONS
Hexadecimal to Binary Conversion Hexadecimal C 3 Binary Binary to Hexadecimal Conversion Binary Hexadecimal E A

12 DECIMAL TO HEXADECIMAL CONVERSION
Divide by 16 Process Decimal # 47 ÷ 16 = 2 remainder 15 2 ÷ 16 = 0 remainder 2 2 F

13 HEXADECIMAL TO DECIMAL CONVERSION
Convert hexadecimal number 2DB to a decimal number 256s 16s 1s Place Value D B Hexadecimal (256 x 2) (16 x 13) (1 x 11) = 731 Decimal

14 TEST Convert Hexadecimal number A6 to Binary A6 =
Convert Hexadecimal number 16 to Decimal 16 = 22 (Decimal) Convert Decimal 63 to Hexadecimal 63 = 3F (Hexadecimal)

15 Uses 8 symbols -Base 8 System
OCTAL NUMBERS Uses 8 symbols -Base 8 System 0, 1, 2, 3, 4, 5, 6, 7 Decimal 1 6 7 8 9 Binary 001 110 111 Octal 1 6 7 10 11

16 Binary-Coded Decimal (BCD)
Digit Bit pattern 0000 1 0001 2 0010 3 0011 4 0100 5 0101 6 0110 7 0111 8 1000 9 1001 Four bits per digit Note: the following bit patterns are not used:

17 Example = ? (in BCD)

18 ASCII Features 7-bit code 8th bit is unused (or used for a parity bit)
27 = 128 codes Two general types of codes: 95 are “Graphic” codes (displayable on a console) 33 are “Control” codes (control features of the console or communications channel)

19 ASCII Chart

20 Addition (decimal)

21 Addition (binary)

22 Addition (binary)

23 Addition (binary)

24 Multiplication (decimal)

25 Multiplication (binary)

26 Multiplication (binary)
It’s interesting to note that binary multiplication is a sequence of shifts and adds of the first term (depending on the bits in the second term. is missing here because the corresponding bit in the second terms is 0.

27 Methods for representing signed ints.
signed magnitude 1’s complement (diminished radix complement) 2’s complement (radix complement)

28 Signed magnitude Ex. 4-bit signed magnitude 1 bit for sign
3 bits for magnitude

29 1’s Complement 1’s complement of N is defined as (2n -1)-N.
If n=4 have (2n -1) being = 1111 So for n=4 would subtract any 4-bit binary number from 1111. This is just inverting each bit. Example: 1’s compliment of is

30 2’s complement The 2’s complement is defined as 2n-N
Can be done by subtraction of N from 2n or adding 1 to the 1’s complement of a number. For 6 = 0110 The 1’s complement is 1001 The 2’s complement is 1010

31 Operation with 2’s complement
Add 4 and -6 Will use the 2’s complement of -6 or 1010 1110 And taking the 2’s complement of 1110 get = 0010

32 ELECTRONIC TRANSLATORS
Devices that convert from decimal to binary numbers and from binary to decimal numbers. Encoders - translates from decimal to binary Decoders - translates from binary to decimal

33 ELECTRONIC ENCODER - DECIMAL TO BINARY
Binary output Decimal input Decimal to Binary Encoder 3 7 5 Encoders are available in IC form. This encoder translates from decimal input to binary (BCD) output.

34 ELECTRONIC DECODING: BINARY TO DECIMAL
Binary input Decimal output Binary-to- 7-Segment Decoder/ Driver Electronic decoders are available in IC form. This decoder translates from binary to decimal. Decimals are shown on an 7-segment LED display. This decoder also drives the 7-segment display.


Download ppt "Chapter 1 Number System RGGP, Narwana."

Similar presentations


Ads by Google