number systems & logic gates day 1
DESCRIPTION
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. - PowerPoint PPT PresentationTRANSCRIPT
Number Systems & Logic GatesDay 1
Computerized ?
Characters/ Words
Colors
Sounds
Feelings
Characters/ Words
Colors
Sou
Data Representation
BIT – B i n a r y d i g I T ( Either 0 or 1 )
How Data is Stored
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”
Data Representationbyte – 8 bits 10111011
• 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”.
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
Binary Strings
n bit binary string represents 2n different
Binary strings.
Thus,
1 bit Binary String 21=2
0 - A
1 - B
Binary StringsThus,
2 bit Binary String 22=4
00 - A
01 - B
10 - C
11 - D
Binary StringsThus,
3 bit Binary String 23=8
000 - A 100 - E
001 - B 101 - F
010 - C 110 - G
011 - D 111 - H
Binary StringsThus,4 bit Binary String 24=16
0000 - A 1000 - J0001 - B 1001 - K
0010 - C 1010 - L 0011 - D 1011 - M
0100 - E 1100 - N0101 - G 1101 - O0110 - H 1110 - P0111 - I 1111 - Q
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 - 80001 - 1 1001 - 9
0010 - 2 0011 - 3
0100 - 4 0101 - 5 0110 - 6 0111 - 7
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
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
7 bit ASCII codeThe 7 bit ASCII (American Standard Codefor Information Interchange) code wasoriginally proposed by the American NationalStandard Institute (ANSI) and was developed by the International Organization forStandardization (ISO) and the Committee Consultants of International Telephone andTelegraphic (CCITT) into the internationalAlphabet (IA).
Character Codes – ASCII
001100001
01100012
01100103
01100114
01101005
01101016
01101107
01101118
01110009
0111001
Number ASCII Letter ASCII
A1000001B
1000010C
1000011D
1000100E
1000101F
1000110G
1000111H
1001000I
1001001
Character Codes – ASCII
J1001010K
1001011L
1001100M
1001101N
1001110O
1001111P
1010000Q
1010001R
1010010
Letter ASCII Letter ASCII
S1010011T
1010100U
1010101V
1010110W
1010111X
1011000Y
1011001Z
1011010
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”.
Character Codes – EBCDIC
digitzone
111011110000
123455667788
• Each 8-bit byte is divided into two portions– zone portion and digit portion– digit portion is based on the binary number
system
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
Character Codes – EBCDIC
0111100001
111100012
111100103
111100114
111101005
111101016
111101107
111101118
111110009
11111001
Number EBCDIC Letter EBCDIC
A11000001B
11000010C
11000011D
11000100E
11000101F
11000110G
11000111H
11001000I
11001001
Character Codes – EBCDIC Letter EBCDIC Letter EBCDIC
J11010001K
11010010L
11010011M
11010100N
11010101O
11010110P
11010111Q
11011000R
11011001
S11100010T
11100011U
11100100V
11100101W
11100110X
11100111Y
11101000Z
11101001
Kilobyte (KB) is about 1000 bytes1024 Bytes (210 bytes)
Megabyte (MB) is about 1 million bytes1024 KB (220 bytes)
Gigabyte (GB) is about 1 billion bytes1024 MB (230 bytes)
Terabyte (TB) is about 1 trillion bytes1024 GB (240 bytes)
How Capacity is Expressed
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
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.
Binary Number System
Base (Radix) 2
Digits 0, 1
e.g. 11102
1 1 1 0
23=8 2
2=4 2
1=2 2
0=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.