Chap 1. Digital Computers and Information Fall 2003 Sang-Hoon Oh Mokwon Univ.
Chap Digital Computers l Digital Computers o 정보시대 (‘information age’) m a prominent and growing role in modern society o 범용성 ('generality‘) m follow a sequence of instruction, called a program, that operates on given data m perform a variety of information-processing tasks l Digital computer o the best-known example of a digital system o manipulate discrete elements of information (ex) 10 decimal digits, 26 letters of the alphabets,....
Chap Digital Computers l 신호 (Signals) o electrical signals such as voltages and currents o two discrete values m High (output) 4.5~5.5 (input) 3.0~5.5 m Low (output) -0.5~1.0 (input) -0.5~2.0 o High & Low (H & L), True & False, 1 & 0 l 2 진수 체계 (Binary Number System) o a binary digit is called a bit o information is represented in group of bits o use various coding techniques
Chap Digital Computers l 컴퓨터 구조 (Computer Structure) Figure 1-2: Block Diagram of a Digital Computer
Chap Digital Computers l Basic Structure o memory unit: stores programs, input, output, data o processor unit: performs arithmetic and other data-processing operations, as specified by the program o control unit: supervises the flow of information between units (CPU = control unit + data path) o input device: key board o output device: CRT, LCD l More o FPU (floating-point unit) o MMU (memory management unit) (Memory: MMU + internal cache + external cache + RAM) (See Text p.5)
Chap 숫자체계 (Number Systems) l 10 진수 : decimal number (base 10 or radix 10) o = 7 x x x x o In general, m A n A n-1....A 1 A 0.A -1 A A -m+1 A -m m Each A i coefficient is in {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} l 기수 (base or radix) r o expressed with a power series in r A n r n + A n-1 r n A 1 r 1 + A 0 r 0 + A -1 r -1 + A -2 r -2 +.… + A -m+1 r -m+1 + A -m r -m o expresses in positional notation( 자리표기법 ) m A n A n-1....A 1 A 0.A -1 A A -m+1 A -m o. is called radix point( 소수점 )
Chap Number Systems o A n is the most significant digit (MSD) o A -m is the least significant digit (LSD) o enclose coefficients in parentheses and place a subscript (312.4) 5 = 3 x x x x 5 -1 = = (82.8) 10 o in computer work, binary, octal, and hexadecimal is popular l 2 진수 (Binary Numbers) o base 2 with two digits: 0 & 1 (11010) 2 = 1x x x x x2 0 = (26) 10 o digits in a binary numbers are called bits powers of two are listed in Table 1-1.
Chap Number Systems Table 1-1: Powers of Two 2 10 = 1024 referred to as K (Kilo); 2 20 as M (Mega); 2 30 as G (Giga)
Chap Number Systems l conversion of decimal to binary o successively subtracts powers of two from the decimal number o (625) 10 = ( ? ) = = = = = = = 1 16 = = 0 1 = 2 0 (625) 10 = = ( ) 2
Chap Number Systems l 8 진수와 16 진수 (Octal and Hexadecimal Number) o octal number - base 8 (0, 1,..., 6, 7) (127.4) 8 = 1x x x x8 -1 = (87.5 ) 10 o hexadecimal number - base 16 (0,1,....,9,A,B,C,D,E,F) (B65F) 16 = 11x x x x16 0 = (46687) 10 o 1 octal digit = 3 binary digits 1 hexa digit = 4 binary digits o conversion ( )2 = (2C6B.F06) 16 (3A6.C) 16 = = ( ) 2
Chap Number Systems Table 1-2 Numbers with Different Bases
Chap Arithmetic Operations l addition, subtraction, and multiplication o same as for decimal numbers (Ex1.1) (59F) 16 + (E46) 16 (1) 5 9 F E E E 5 (Ex1.2) (762)8 x (45)8 (Octal) (Octal) (Decimal)(Octal) x 2= 10 = 8 + 2= x 6 + 1= 31 = = x 7 + 3= 38 = = x 2= 8 = 8 + 0= x 6 + 1= 25 = = 31 4 x 7 + 3= 31 = = 37
Chap Arithmetic Operations l Conversion from Decimal to Other Base (Ex1.3) (153) 10 = ( ? ) 8 153/8 = / /8 = 2 + 3/ /8 = 0 + 2/ (153) 10 = (231) 8 (Ex1.5) (0.6875) 10 = ( ? ) x 2 = x 2 = x 2 = x 2 = (0.6875) 10 = (0.1011) 2
Chap 진코드 (Decimal Codes) l decimal number system (people are accustomed to) (vs) binary number system (natural for computer) l 2 ways o convert decimal numbers to binary m perform all arithmetic calculation in binary and then convert the binary results back to decimal o perform the arithmetic operations with decimal numbers when they are stored in coded form l n-bit binary code o a group of n bits up to 2n distinct combinations of 1's & 0's o 2-bit binary code: 00, 01, 10, 11
Chap Decimal Codes l 10 decimal digits o 4-bit binary code (6 are unassigned) o numerous different binary codes o BCD (Binary Coded Decimal) o (185) 10 = ( ) BCD = ( ) 2 o BCD numbers are decimal numbers, not binary numbers
Chap Decimal Codes l BCD Addition o add two BCD numbers as if two binary numbers o if sum is greater than or equal to 1010, add 0110 (ex) Text p.17
Chap 영문숫자코드 (Alphanumeric Codes) l handle of data of numbers and letters o set of elements include 10 digits, 26 letters, special characters o 36 ~ 64 letters if only capital letters: need 6 bits 64 ~ 128 letters if upper/lower letters: need 7 bits l ASCII Character Code o standard binary code is ASCII (Table 1.4) o ASCII contain 94 graphic chars + 34 control chars l Parity Bit o ASCII is a 7-bit code + 1 bit => 8-bit (1 byte) \---- used for specific purpose
Chap Alphanumeric Codes o parity bit: total number of 1 is even (even parity) total number of 1 is odd (odd parity) (even parity) (odd parity) ASCII A = ASCII T = helpful in detecting errors during the transmission of information l Unicode o a new standard for 16-bit alphanumeric codes o referred to as Unicode/10646 o 16 bits provide 65,536 code words, m represent the symbols and ideographs of the world's languages o 16 bits, implemented in computers by 2 bytes m little-endian vs big-endian