120 likes | 435 Views
Computer Codes. Rohit Khokher. Computer Codes. Data types. Numeric. Nonnumeric. Special Characters +,-, /, *,~,`,!, @, #,$,%, ^, &, (, ),_ =, <, >, :,;,., [,],{, }, …. Integer. Real. Alphab et A, B, C, …,Z a, b, c,…,z. Digits 0,…,9. Computer Codes.
E N D
Computer Codes RohitKhokher
Computer Codes Data types Numeric Nonnumeric Special Characters +,-, /, *,~,`,!, @, #,$,%, ^, &, (, ),_ =, <, >, :,;,., [,],{, }, … Integer Real Alphabet A, B, C, …,Z a, b, c,…,z Digits 0,…,9
Computer Codes Any data is internally represented using bits (0 and 1) Computer codes were invented by grouping the bits to represent the data types A group consisting of n bits was called n-bit-byte. The group size is standardized to 8-bits. Now a byte means a group of 8-bits.
BCD (Binary Coded Decimal) Code Binary code Binary code Binary code Alphabet Alphabet Binary code Alphabet Digits Zone Zone Zone Zone BCD Code BCD Code BCD Code BCD Code
BCD (Binary Coded Decimal) Code In BCD code digits 1 to 9 and alphabet A-Z are coded using Zone (2)bits + (Binary equivalent of digits 1 to 9) 4 bits BCD code uses 6 bits, so there are 26 (64) codes 9 codes for digits, 1 for 0, 26 for alphabet and 28 codes for other characters. 26 (64) codes are insufficient to generate codes for all the required characters.
EBCDIC: Extended Binary Coded Decimal Interchange code EBCDIC A to I 0000 0001 0010 0011 0100 0101 0110 0111 0000 0001 0010 0011 0100 0101 0111 1000 1001 1010 1011 1100 1101 1110 1111 C1 C2 C3 C4 C5 C6 C7 C8 C9 J to R Zones D1 D2 D3 D4 D5 D6 D7 D8 D9 E2 E3 E4 E5 E6 E7 E8 E9 S to Z F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 0 to 9 9+9+8+10 =36 Codes But, there may be 28 =256 possible code
ASCII American Standard Code for Information Exchange (ASCII) ASCII-7 zone (3bits) digit (4-bits) ASCII -8 zone (4bits) digit (4-bits)
COLLATING SEQUENCES A<B<C<…<Z 0<1<2<…<9 Search for other Characters & Prepare a report