1 / 24

Number Systems & Logic Gates Day 1

Number Systems & Logic Gates Day 1. Computerized ?. Characters/ Words Colors Sounds Feelings. Characters/ Words Colors Sou. Data Representation. How Data is Stored. ( Either 0 or 1 ). BIT – B i n a r y d i g I T.

liliha
Download Presentation

Number Systems & Logic Gates Day 1

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Number Systems & Logic GatesDay 1

  2. Computerized ? Characters/ Words Colors Sounds Feelings Characters/ Words Colors Sou

  3. Data Representation How Data is Stored ( Either 0 or 1 ) BIT – B i n a r y d i g I T • Basic unit for storing data in main computer memory is the bit. A bit can represent one of only two values. • bit 0 is said to be “off” • bit 1 is said to be “on”

  4. 1 1 0 1 1 1 0 1 Data Representation byte – 8 bits • Many computers use a combination of 8 bits (called a byte) as a unit for storing data. • Thus a byte is a location in the computer main memory consists of 8 adjacent bits. • When a character is entered from the keyboard, the computer interprets the character and stores it as a series of bits being “on” and “off”.

  5. Binary String • Collection of bits/ bit sequence is called as a Binary String. Example 1,0,1 1,1,1,0,1,1 1,0,1,0,1,.0,1,0

  6. Binary Strings n bit binary string represents 2n different Binary strings. Thus, 1 bit Binary String 21=2 0 - A 1 - B

  7. Binary Strings Thus, 2 bit Binary String 22=4 00 - A 01 - B 10 - C 11 - D

  8. Binary Strings Thus, 3 bit Binary String 23=8 000 - A 100 - E 001 - B 101 - F 010 - C 110 - G 011 - D 111 - H

  9. Binary Strings Thus, 4 bit Binary String 24=16 0000 - A 1000 - J 0001 - B 1001 - K 0010 - C 1010 - L 0011 - D 1011 - M 0100 - E 1100 - N 0101 - G 1101 - O 0110 - H 1110 - P 0111 - I 1111 - Q

  10. Binary Coded Decimal (BCD) BCD is a 4-bit code used for coding numerical values only. 4 bit Binary String 24=16 0000 - 0 1000 - 8 0001 - 1 1001 - 9 0010 - 2 0011 - 3 0100 - 4 0101 - 5 0110 - 6 0111 - 7

  11. Binary Coded Decimal (BCD) The decimal number 109 can be coded as 1- 0001 (BCD) 0- 0000 (BCD) 9- 1001 (BCD) 1 0 9 0001 0000 1001 0001000010001

  12. Binary Strings Thus, 5 bit Binary String 25=32 6 bit Binary String 26=64 7 bit Binary String 27=128 8 bit Binary String 28=256

  13. 7 bit ASCII code The 7 bit ASCII (American Standard Code for Information Interchange) code was originally proposed by the American National Standard Institute (ANSI) and was developed by the International Organization for Standardization (ISO) and the Committee Consultants of International Telephone and Telegraphic (CCITT) into the international Alphabet (IA).

  14. Character Codes – ASCII Number ASCII Letter ASCII 0 0110000 1 0110001 2 0110010 3 0110011 4 0110100 5 0110101 6 0110110 7 0110111 8 0111000 9 0111001 A 1000001 B 1000010 C 1000011 D 1000100 E 1000101 F 1000110 G 1000111 H 1001000 I 1001001

  15. Character Codes – ASCII Letter ASCII Letter ASCII J 1001010 K 1001011 L 1001100 M 1001101 N 1001110 O 1001111 P 1010000 Q 1010001 R 1010010 S 1010011 T 1010100 U 1010101 V 1010110 W 1010111 X 1011000 Y 1011001 Z 1011010

  16. EBCDIC Eight bit EBCDIC (Extended Binary Coded Decimal Interchange Code) is used by large IBM computers and compatible equipment (IBM Personal computers use ASCII). EBCDIC is sometimes called “8 bit ASCII”.

  17. 8 7 6 5 4 3 2 1 0 0 1 1 0 1 1 1 zone digit Character Codes – EBCDIC • Each 8-bit byte is divided into two portions • zone portion and digit portion • digit portion is based on the binary number system

  18. Character Codes – EBCDIC • Numbers • All zone bits “on” and binary digits • Letters (A-I) • Two zone bits (7, 8) “on” and binary digits • Letters (J-R) • Three zone bits (5, 7, 8) “on” and binary digits • Letters (S-Z) • Three zone bits (6, 7, 8) “on” and binary digits

  19. Character Codes – EBCDIC Number EBCDIC Letter EBCDIC 0 11110000 1 11110001 2 11110010 3 11110011 4 11110100 5 11110101 6 11110110 7 11110111 8 11111000 9 11111001 A 11000001 B 11000010 C 11000011 D 11000100 E 11000101 F 11000110 G 11000111 H 11001000 I 11001001

  20. Character Codes – EBCDIC Letter EBCDIC Letter EBCDIC J 11010001 K 11010010 L 11010011 M 11010100 N 11010101 O 11010110 P 11010111 Q 11011000 R 11011001 S 11100010 T 11100011 U 11100100 V 11100101 W 11100110 X 11100111 Y 11101000 Z 11101001

  21. How Capacity is Expressed Kilobyte (KB) is about 1000 bytes 1024 Bytes (210 bytes) Megabyte (MB) is about 1 million bytes 1024 KB (220 bytes) Gigabyte (GB) is about 1 billion bytes 1024 MB (230 bytes) Terabyte (TB) is about 1 trillion bytes 1024 GB (240 bytes)

  22. Radix Number Systems • Each number system has a number of different set of digits which is called the radix or the base of the number system. • Decimal Base=10 • Binary Base=2 • Octal Base=8 • Hexadecimal (Hex) Base=16

  23. Decimal Number System Base (Radix) 10 Digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 e.g. 562510 The magnitude representation by a digit is decided by the position of the digit within the number. 5 6 2 5 103=1000 102=100 101=10 100=1 For example the digit 5 in the left-most position of 5625 counts for 5000 and the digit 2 in the second position counts for 20.

  24. Binary Number System Base (Radix) 2 Digits 0, 1 e.g. 11102 1 1 1 0 23=8 22=4 21=2 20=1 The digit 1 in the third position from the right represents the value 4 and the digit 1 in the fourth position from the right represents the value 8.

More Related