Presentation is loading. Please wait.

Presentation is loading. Please wait.

Company LOGO Edit your slogan here DKT 122/3 DIGITAL SYSTEM 1 WEEK #3 NUMBER SYSTEMS, OPERATION & CODES (PART 2)

Similar presentations


Presentation on theme: "Company LOGO Edit your slogan here DKT 122/3 DIGITAL SYSTEM 1 WEEK #3 NUMBER SYSTEMS, OPERATION & CODES (PART 2)"— Presentation transcript:

1 Company LOGO Edit your slogan here DKT 122/3 DIGITAL SYSTEM 1 WEEK #3 NUMBER SYSTEMS, OPERATION & CODES (PART 2)

2 Company LOGO Add the 2 signed numbers and discard any final carry bit Example: Discard carry bit Signed Numbers Arithmetic Operations - Addition

3 Company LOGO take the 2’s complement of the subtrahend and add to the minuend discard any final carry bit Signed Numbers (Cont.) Arithmetic Operations - Subtraction Example: – minuend subtrahend Discard carry 2’s complement of subtrahend

4 Company LOGO Number System (Hexadecimal)  Base 16 system  Uses digits 0-9 & letters A,B,C,D,E,F  Groups of four bits represent each base 16 digit

5 Company LOGO Hexadecimal to Decimal Conversion Convert 3B4F 16 to its decimal equivalent: 3 B 4 F xx x , Positional Values Products x Hex digits Number System (Hex) (Cont.)

6 Company LOGO Convert to its hexadecimal equivalent: 830 / 16 = 51 R / 16 = 3 R 3 3 / 16 = 0 R 3 33E 16 Number System (Hex) (Cont.) Decimal to Hexadecimal Conversion E in Hex

7 Company LOGO Grouping the binary position in 4-bit groups, starting from the least significant position. Number System (Hex) (Cont.) Binary to Hexadecimal Conversion

8 Company LOGO Example Convert to hex using the 4-bit substitution code : A E 6 A Binary to Hexadecimal Conversion Number System (Hex) (Cont.)

9 Company LOGO Solve this.. a)Convert hexadecimal number 23 16, 8D 16 and EB 16 to decimal b)Convert decimal number 52 10, and to hexadecimal c)Convert hexadecimal number and 5C8 16 to binary d)Convert binary number 1110 and to hexadecimal

10 Company LOGO Numbering System (Octal)  Also known as the Base 8 System  Uses digits  Readily converts to binary  Groups of three (binary) digits can be used to represent each octal digit  Also uses multiplication and division algorithms for conversion to and from base 10

11 Company LOGO Convert to its decimal equivalent xx x Positional Values Products Octal Digits Numbering System (Octal) (Cont.) Octal to Decimal Conversion

12 Company LOGO Use the repeated division-by-8 method Example Convert to its octal equivalent 427 / 8 = 53 R 3LSB 53 / 8= 6 R 5 6 / 8 = 0 R 6MSB Numbering System (Octal) (Cont.) Decimal to Octal Conversion

13 Company LOGO Each octal number converts to 3 binary digits Example Convert to binary Octal to Binary Conversion Substitute numbers with 3-binary digits Numbering System (Octal) (Cont.)

14 Company LOGO Grouping the binary position in groups of 3 starting at the least significant position. Example Convert the binary numbers to octal Binary to Octal Conversion Numbering System (Octal) (Cont.)

15 Company LOGO a)Convert octal number 64 8, and to decimal b)Convert decimal number 46 10, and to octal c)Convert octal number and to binary d)Convert binary number and to octal Solve this..

16 Company LOGO Digital Codes - BCD  BCD (Binary Coded Decimal) Code  Represent each of the 10 decimal digits (0~9) as a 4-bit binary code. Example Convert 15 to BCD BCD

17 Company LOGO Step 1: Add the two BCD numbers, using the rules for binary addition Step 2: If a 4-bit sum is equal to or less than 9, it is a valid BCD number Step 3: If a 4-bit sum is greater than 9 / if a carry out is generated, it is an invalid BCD result. Add 6 (0110) to the 4-bit sum Digital Codes – BCD (Cont.) Addition

18 Company LOGO Example: (Valid BCD number) Digital Codes – BCD (Cont.) Addition – Valid number

19 Company LOGO Example: (Invalid BCD number coz >9) (Add 6) (Valid BCD number) 1 Digital Codes – BCD (Cont.) Addition – Not valid number 3

20 Company LOGO Digital Codes - ASCII  ASCII (American Standard Code for Information Interchange) Code  Used to translate from the keyboard characters to computer language

21 Company LOGO ASCII Codes - Table

22 Company LOGO Digital Codes - Gray Gray Code – Only 1 bit changes – Can’t be used in arithmetic circuits Exhibits only a single change from one code word to the next in sequence Need to know how to convert binary to Gray and vice versa. DecimalBinary Gray Code

23 Company LOGO Convert binary number to gray code Gray Codes ++++ Digital Codes – Gray (Cont.) Binary to Gray Conversion

24 Company LOGO Convert gray code to binary Binary ++++ Gray to Binary Conversion Digital Codes – Gray (Cont.)

25 Company LOGO Solve this.. (a) Convert binary number to gray code. (b) Convert gray code to binary. Answer : ? END


Download ppt "Company LOGO Edit your slogan here DKT 122/3 DIGITAL SYSTEM 1 WEEK #3 NUMBER SYSTEMS, OPERATION & CODES (PART 2)"

Similar presentations


Ads by Google