Digital Systems and Binary Numbers


 Reynard Spencer
 4 years ago
 Views:
Transcription
1 Digital Systems and Binary Numbers Prof. Wangrok Oh Dept. of Information Communications Eng. Chungnam National University Prof. Wangrok Oh(CNU) 1 / 51
2 Overview 1 Course Summary 2 Binary Numbers 3 NumberBase Conversions 4 Octal and Hexadecimal Numbers 5 Complements of Numbers 6 Signed Binary Numbers 7 Binary Codes 8 Binary Storage and Registers 9 Binary Logic Prof. Wangrok Oh(CNU) 2 / 51
3 Course Summary Lecturer: Wangrok Oh Office: Room 4211, Engineering Building #3 T E. Text Book M. Morris Mano and Michael D. Ciletti, Digital Design with an Introduction to the Verilog HDL, 5th ed., Pearson Course Objective Equip the students with a solid understanding of digital systems and to introduce them to the methodology of modern digital design Course Homepage: Grading (tantative) Midterm Exam. (30 %), Final Exam. (40 %), Quiz (20 %), Homework (10 %) Prof. Wangrok Oh(CNU) Course Summary 3 / 51
4 Binary Numbers A decimal number 7, A number with a decimal point: a 5 a 4 a 3 a 2 a 1 a 0.a 1 a 2 a 3 a a a a a a a a a The decimal number system is said to be of base or radix 10 The radix point (the decimal point when 10 is the radix) distinguishes positive powers of 10 from negative powers of 10 Binary number system is a different number system The coefficients have only two possible values: 0 and 1 Each coefficient a j is multiplied by a power of the radix, 2 j and the results are added to obtain the decimal equivalent of the number Binary number = Prof. Wangrok Oh(CNU) Binary Numbers 4 / 51
5 Binary Numbers There are many different number systems In general, a number system with a base r system has coefficients multiplied by powers of r a n r n + a n 1 r n a 1 r + a 0 + a 1 r a m r m The coefficients a j range in value from 0 to r 1 To distinguish between numbers of different bases, we enclose the coefficients in parentheses and write a subscript equal to the base used (4021.2) 5 = = (511.4) 10 (127.4) 8 = = (87.5) 10 What should we do when the base of the number is greater than 10? Hexadecimal number system: Base=16 The first 10 digits are borrowed from the decimal number systems Prof. Wangrok Oh(CNU) Binary Numbers 5 / 51
6 Binary Numbers The letters A, B, C, D, E and F are used for the digits 10, 11, 12, 13, 14 and 15, respectively (B65F) 16 = = (46687) 10 Hexadecimal number system is used commonly to represent long strings of bits = (B65F) 16 B 6 5 F The digits in a binary number are called bits When a bit is equal to 0, it does not contribute to the sum during the conversion Adding only the numbers with powers of two corresponding to the bits equal to 1 (110101) 2 = = = (53) 10 In computer work, 2 10 is referred to as K (kilo), 2 20 as M (mega), 2 30 as G (giga) and 2 40 as T (tera) A byte is equal to eight bits Prof. Wangrok Oh(CNU) Binary Numbers 6 / 51
7 in the addresses, instructions, and data in digital systems. partial For example, product: B65F is used to 1011 represent As noted before, the digits in a binary number are called bits. product: When a bit is equal to 0, it does not contribute to the sum during the conversion. Therefore, the conversion from binary Table 1.1 to decimal can be obtained by adding only the numbers with powers of two Powers of Two corresponding to the bits that are equal Powers to 1. of For Two example, n 2 n (110101) n 2 n n 2 n 2 = = (53) 10 Binary Numbers There 0 are four 1 s 1 in the binary 8 number. 256 The corresponding 16 decimal 65,536 number is the sum of the four 1 powers of 2 two. Zero 9 and the first numbers obtained 17 from 131,072 2 to the power of n are listed 2 in Table In computer 10 work, 1, (1K) is referred 18 to as K (kilo), 262, as M (mega), 2 30 as G (giga), 3 and as T (tera). 11 Thus, 4K 2,048 = 2 12 = 4,09619 and 16M = 524,288 2 = 16,777,216. Computer 4 capacity 16 is usually 12 given in bytes. 4,096 A (4K) byte is equal 20 to eight 1,048,576 bits and (1M) can accommodate (i.e., 5 represent 32 the code 13 of) one 8,192 keyboard character. 21 A computer 2,097,152 hard disk with four gigabytes 6 of storage 64 has a 14 capacity 16,384 of 4G = 2 32 bytes 22 (approximately 4,194,304 4 billion bytes). A terabyte 7 is gigabytes, approximately 15 32,768 1 trillion bytes. 23 8,388,608 Arithmetic operations with numbers in base r follow the same rules as for decimal numbers. Arithmetic When operations a base other with than the numbers familiar in base base 10 is rused, follow one the must same be careful rulesto use only the r allowable digits. Examples of addition, subtraction, and multiplication of two as binary for decimal numbers numbers are as follows: augend: minuend: multiplicand: 1011 addend: subtrahend: multiplier: * 101 sum: difference: partial product: 1011 product: Table 1.1 Prof. Wangrok Powers Oh(CNU) of Two Binary Numbers 7 / 51
8 NumberBase Conversions Representations of a number in a different radix are said to be equivalent if they have the same decimal representations A number in base r to decimal: Expanding the number in a power series and adding all the terms A decimal number to a number in base r: Dividing the number and all successive quotients by r and accumulating the remainders Example (Convert Decimal 41 to Binary) 1 41 is divided by 2 to give an integer quotient of 20 and the remainder of 1 2 The quotient, 20 is again divided by 2 to give a new quotient 10 and the remainder 0 3 Repeat this until a new quotient is 0 4 The coefficients of the desired binary number are obtained from the remainders Prof. Wangrok Oh(CNU) NumberBase Conversions 8 / 51
9 NumberBase Conversions 41 = a 0 = 1 20 = a 1 = 0 10 = a 2 = 0 5 = a 3 = 1 2 = a 4 = 0 1 = a 5 = 1 The answer is (41) 10 = (a 5 a 4 a 3 a 2 a 1 a 0 ) 2 = (101001) 2 41 = = = = ( ) + 1 = Prof. Wangrok Oh(CNU) NumberBase Conversions 9 / 51
10 NumberBase Conversions The arithmetic process can be manipulated more conveniently Integer Quotient Remainder Prof. Wangrok Oh(CNU) NumberBase Conversions 10 / 51
11 NumberBase Conversions Example (Convert Decimal 153 to Octal) The required base r is 8 The answer is (153) 10 = (231) 8 Integer Quotient Remainder The conversion of a decimal fraction to binary is accomplished by a method similar to that used for integers Multiplication is used instead of division and integers instead of remainders are accumulated Prof. Wangrok Oh(CNU) NumberBase Conversions 11 / 51
12 NumberBase Conversions Example (Convert (0.6875) 10 to Binary) is multiplied by 2 to give an integer and a fraction 2 New fraction is multiplied by 2 to give a new integer and a new fraction 3 Repeat this until the fraction becomes 0 or until the number of digits has sufficient accuracy = a 1 = = a 2 = = a 3 = = a 4 = 1 Prof. Wangrok Oh(CNU) NumberBase Conversions 12 / 51
13 NumberBase Conversions = 1 ( ) 2 ( ) ( ) = 1 2 ( ( ( ) ) ) = ( = = ( 1 2) 3 + = (0.1011) ( ) ( ) ) 2 (1 + 0) Prof. Wangrok Oh(CNU) NumberBase Conversions 13 / 51
14 NumberBase Conversions Example (Convert (0.513) 10 to Octal) = = = = = = The answer, to seven significant figures, is obtained from the integer part of the products: ( ) 8 Prof. Wangrok Oh(CNU) NumberBase Conversions 14 / 51
15 NumberBase Conversions The conversion of decimal numbers with both integer and fraction parts is done by converting the integer and the fraction separately and then combining the two answers For example, ( ) 10 = ( ) 2 Prof. Wangrok Oh(CNU) NumberBase Conversions 15 / 51
16 Octal and Hexadecimal Numbers Too long binary sequence is not easy to recognize The conversion from and to binary, octal and hexadecimal plays an important role in digital computers Since 2 3 = 8 and 2 4 = 16, each octal and hexadecimal digit correspond to 3 and 4 binary digits, respectively Binary to octal is easily accomplished by partitioning the binary number into groups of three digits starting from the binary point and proceeding to the left and to the right ( ) 2 = ( ) 8 6 Binary to hexadecimal is accomplished by partitioning the binary number into groups of four digits starting from the binary point and proceeding to the left and to the right ( ) 2 = (2C6B.F2) 16 2 C 6 B F 2 Prof. Wangrok Oh(CNU) Octal and Hexadecimal Numbers 16 / 51
17 Octal and Hexadecimal Numbers Conversion from octal or hexadecimal to binary is done by reversing the preceding procedure ( ) 8 = ( (306.D) 15 = ( D ) ) 2 Prof. Wangrok Oh(CNU) Octal and Hexadecimal Numbers 17 / 51
18 Octal and Hexadecimal Numbers Section 1.4 Octal and Hexadecimal Numbers 9 Table 1.2 Numbers with Different Numbers Bases with Different Bases Decimal (base 10) Binary (base 2) Octal (base 8) Hexadecimal (base 16) A B C D E F Prof. Wangrok Oh(CNU) Octal and Hexadecimal Numbers 18 / 51
19 Complements of Numbers Complements are used in digital computers to simplify the subtraction operation and logical manipulation Simplifying operations leads to simpler, less expensive circuits to implement the operations There are two types of complements for each baser system 1 Radix complement: r s complement 2 Diminished radix complement: (r 1) s complement Definition (Diminished Radix Complement) Given a number N in base r having n digits, the (r 1) s complement of N is defined as (r n 1) N For decimal numbers: r = 10 (r 1) = 9 9 s complement of N = (10 n 1) N 9 s complement is obtained by subtracting each digit from 9 Prof. Wangrok Oh(CNU) Complements of Numbers 19 / 51
20 Complements of Numbers For binary numbers: r = 2 (r 1) = 1 1 s complement of N = (2 n 1) N Since 1 0 = 1 and 1 1 = 0, the 1 s complement of a binary number is formed by changing 1 s to 0 s and 0 s to 1 s Example (Diminished Radix Complement) The 9 s complement of = The 9 s complement of = The 1 s complement of = The 1 s complement of = Prof. Wangrok Oh(CNU) Complements of Numbers 20 / 51
21 Complements of Numbers Definition (Radix Complement) Given a number N in base r having n digits, the r s complement of N is defined as r n N for N 0 and as 0 for N = 0 Note that r n N = [ (r n 1) N ] + 1 Comparing with the (r 1) s complement, the r s complement is obtained by adding 1 to the (r 1) s complement 10 s complement of N can be formed also as follows: 1 Leaving all least significant 0 s unchanged 2 Subtracting the first nonzero least significant digit from 10 3 Subtracting all higher significant digits from Prof. Wangrok Oh(CNU) Complements of Numbers 21 / 51
22 Complements of Numbers 2 s complement of N can be formed also as follows: 1 Leaving all least significant 0 s and the first 1 unchanged 2 Replacing 1 s with 0 s and 0 s with 1 s in all other higher significant digits If the original number N contains a radix point: 1 The radix point should be removed temporarily in order to form the r s or (r 1) s complement 2 Radix point is then restored to the complemented number in the same relative position The complement of the complement restores the number to its original value r n (r n N) = N Prof. Wangrok Oh(CNU) Complements of Numbers 22 / 51
23 Complements of Numbers Subtraction with complement The direct method of subtraction is efficient when people perform subtraction with paper and pencil When subtraction is implemented with digital hardware, the method is less efficient than the method that uses complements Subtraction of two ndigit unsigned numbers (M N) in base r 1 Add the minuend M to the r s complement of the subtrahend N: M + (r n N) = M N + r n 2 If M N, the sum will produce an end carry r n which can be discarded 3 If M < N, the sum does not produce an end carry and is equal to r n (N M) which is the r s complement of (N M) To obtain the answer, take the r s complement of the sum and place a negative sign in front Prof. Wangrok Oh(CNU) Complements of Numbers 23 / 51
24 Complements of Numbers Example ( ) M = s complement of N = Sum = Discard end carry 10 5 = Example ( ) M = s complement of N = Sum = s complement of the sum = (10 s complement of the sum) = Prof. Wangrok Oh(CNU) Complements of Numbers 24 / 51
25 Complements of Numbers Example (X = and Y = ) 1 (X Y ) X = s complement of Y = Sum = Discard end carry 2 7 = (Y X) Y = s complement of X = Sum = s complement of the sum = (2 s complement of the sum) = Prof. Wangrok Oh(CNU) Complements of Numbers 25 / 51
26 Complements of Numbers Subtraction of unsigned numbers can also be done by means of the (r 1) s complement Remember that the (r 1) s complement is one less than the r s complement The sum is one less than the correct difference when an end carry occurs Removing the end carry and adding 1 to the sum Prof. Wangrok Oh(CNU) Complements of Numbers 26 / 51
27 Complements of Numbers Example (X = and Y = ) 1 (X Y ) X = s complement of Y = Sum = Discard end carry 2 7 = Add endaround carry = 1 Answer = (Y X) Y = s complement of X = Sum = s complement of the sum = (1 s complement of the sum) = Prof. Wangrok Oh(CNU) Complements of Numbers 27 / 51
28 Signed Binary Numbers To represent negative numbers, we need a notation for negative values In ordinary arithmetic, a negative number is indicated by a minus sign and a positive number by a plus sign Because of hardware limitations, computers must represent everything with binary digits, 0 or 1 The leftmost position of the number is used to represent the sign Sign bit 0 for positive and 1 for negative Signed The leftmost bit represents the sign and the rest of the bits represent the number Unsigned The leftmost bit is the most significant bit of the number 01001: Signed +9/Unsigned : Signed 9/Unsigned 25 The representation of the signed numbers in the above example is referred to as the signedmagnitude convention Prof. Wangrok Oh(CNU) Signed Binary Numbers 28 / 51
29 Signed Binary Numbers When arithmetic operations are implemented in a computer, it is more convenient to use a different system, referred to as the signedcomplement system A negative number is indicated by its complement Note that the signedmagnitude system negates a number by changing its sign Signedcomplement system negates a number by taking its complement The signedcomplement system can use either the 1 s or the 2 s complement 2 s complement is the most common Consider the number 9 represented in binary with eight bits +9 = = with signedmagnitude 9 = with signed 1 s complement 9 = with signed 2 s complement Prof. Wangrok Oh(CNU) Signed Binary Numbers 29 / 51
30 Signed Binary Numbers 16 Chapter 1 Digital Systems and Binary Numbers Table 1.3 Signed Binary Numbers Decimal Signed Binary Numbers Signed 2 s Complement Signed 1 s Complement Signed Magnitude The positive numbers in all three representations are identical The signed2 s complement system has only one representation for 0 representation of negative numbers. The same procedures can be applied to the signed 1 s complement system by including the end around carry as is done with unsigned numbers. Prof. Wangrok Oh(CNU) Signed Binary Numbers 30 / 51
31 Signed Binary Numbers With four bits, we can represent 16 binary numbers In the 1 scomplement, there are eight positive numbers and eight negative numbers In the 2 scomplement, there are seven positive numbers, one zero and eight negative numbers Arithmetic Addition The addition of two signed 2 s Section complement 1.6 Signed binary Binary numbers Numbers is 17 obtained from the addition of the two numbers including their sign Numerical A examples carry out of for the addition signbit follow: position is discarded Note that negative numbers must be initially in 2 s complement form and that if the sum obtained after the addition is negative, it is in 2 s complement form. For example, 7 is Prof. Wangrok Oh(CNU) Signed Binary Numbers 31 / 51
32 Signed Binary Numbers Arithmetic Subtraction Subtraction procedure Take the 2 s complement of the subtrahend including the sign bit Add it to the minuend including the sign bit A carry out of the signbit position is discarded This procedure is adopted because a subtraction can be changed to an addition (±A) (±B) = (±A) + ( B) Changing a positive number to a negative number is easily done by taking the 2 s complement ( 6) ( 13) = ( 6) + (+13) = = Removing the end carry, we obtain the answer Prof. Wangrok Oh(CNU) Signed Binary Numbers 32 / 51
33 Binary Codes number in BCD is the same as its equivalent binary number only when the number is between 0 and 9. A BCD number greater than 10 looks different from its equivalent binary number, even though both contain 1 s and 0 s. Moreover, the binary combinations 1010 through 1111 are not used and have no meaning in BCD. C o n s i d e r d e c i m a l 185 and its corresponding value in BCD and binary: An nbit binary code (185) is a group of n bits 2 n 10 = ( ) BCD = ( ) distinct 2 combinations of 1 s and 0 s 2 n elements can be represented Binary Coded Decimal Code Table 1.4 Binary Coded Decimal (BCD) Commonly referred to as (8421) BCD Decimal BCD Each group of 4 bits representing one decimal digit Symbol Digit Binary combinations 1010 through 1111 are not used (185) 10 = ( ) BCD = ( ) 2 BCD needs more bits than its equivalent binary representation BCD is more readable than binary representation Prof. Wangrok Oh(CNU) Binary Codes 33 / 51
34 from a previous less significant pair of digits. Since each digit does not exceed 9, the sum cannot be greater than = 19, with the 1 being a previous carry. Suppose we add the BCD digits as if they were binary numbers. Then the binary sum will produce a result in the range from 0 to 19. In binary, this range will be from 0000 to 10011, but in BCD, it is from 0000 to , with the first (i.e., leftmost) 1 being a carry and the next four bits being the BCD sum. When the binary sum is equal to or less than 1001 (without a carry), the corresponding BCD digit is correct. However, when BCD the Addition binary sum is greater than or equal to 1010, the result is an invalid BCD digit. The When addition the sum of 6 = is equal (0110) to 2 to orthe less binary than sum 1001converts BCDit digit to the iscorrect digit and also produces When the a carry sumas is required. greater than This or is equal because to 1010 a carry in the most significant bit position of The the binary result isum an and invalid a decimal BCD carry differ by = 6. Consider the following three The addition BCD additions: of 6 to the sum converts it to the correct BCD Binary Codes In each This case, is the because two BCD a carry digits inare theadded mostas significant if they were bit two position binary of numbers. the If the binary sum binary is greater sum and than a or decimal equal to carry 1010, differ we add by to obtain = 6 the correct BCD sum and a carry. In the first example, the sum is equal to 9 and is the correct BCD sum. In the second example, the binary sum produces an invalid BCD digit. The addition of 0110 produces the correct BCD sum, 0010 (i.e., the number 2), and a carry. In the third example, the binary sum produces a carry. This condition occurs when the sum is greater than or equal to 16. Although the other four bits are less than 1001, the binary sum Prof. Wangrok Oh(CNU) Binary Codes 34 / 51
35 Binary Codes Section 1.7 Binary Codes 21 Th e a d d i t i o n o f t w o n digit unsigned BCD numbers follows the same procedure. Consider Addition the addition of two of ndigit BCD 576 = numbers 760 in BCD: Decimal Arithmetic BCD Binary sum Add BCD sum The first, least significant pair of BCD digits produces a BCD digit sum of 0000 and a carry for the next pair of digits. The second pair of BCD digits plus a previous carry Signed decimal numbers in BCD is similar to the signed binary produces a digit sum of 0110 and a carry for the next pair of digits. The third pair of number digits plus a carry produces a binary sum of 0111 and does not require a correction. A plus with four 0 s (0000) and a minus with 9 (1001) The signedmagnitude system is seldom used in computers Decimal Arithmetic The signedcomplement system can be either the 9 s or the 10 s The representation complement of signed decimal numbers in BCD is similar to the representation of signed 10 s numbers complement in binary. We is the can one use most either often the familiar used signed magnitude system or the Addition signed complement system. The sign of a decimal number is usually represented with four bits to conform to the four bit code of the decimal digits. It is customary to 1 Summing all digits including the sign digit designate a plus with four 0 s and a minus with the BCD equivalent of 9, which is Discarding the end carry The signed magnitude system is seldom used in computers. The signed complement system can be either the 9 s or the 10 s complement, but the 10 s complement is the one most often used. To obtain the 10 s complement of a BCD number, we first take the 9 s Prof. Wangrok Oh(CNU) Binary Codes 35 / 51
36 Binary Codes lated from the subtraction of each digit from 9. Th e p ro c e d u re s d e v e l o p e d f o r t h e s i g n e d 2 s complement system in the previous section also apply to the signed 10 s complement system for decimal numbers. Addition is done by summing all digits, including the sign digit, and discarding the end carry. This operation assumes that all negative numbers are in 10 s complement form. Consider the addition (+375) + (240) = +135, done in the signed complement system: The Subtraction 9 in the leftmost position of the second number represents a minus, and 9760 is the 10 s complement of The two numbers are added and the end carry is discarded to 1 Take obtain the s Of complement course, the decimal of the subtrahend numbers inside the computer, including the sign 2 digits, Add it must to the be minuend in BCD. The addition is done with BCD digits as described previously. The subtraction of decimal numbers, either unsigned or in the signed 10 s complement system, Binary is the codes same as for in decimal the binary digits case: Take require the 10 s a minimum complement of of four the bits subtrahend per and add digit it to the minuend. Many computers have special hardware to perform arithmetic Many different codes can be formulated by arranging four bits into 10 distinct combinations Each code uses only 10 out of a possible 16 bit combinations that can be arranged with four bits The other six unused combinations have no meaning and should be avoided Other Decimal Codes Prof. Wangrok Oh(CNU) Binary Codes 36 / 51
37 Binary Codes Table 1.5 Four Different Binary Codes for the Decimal Digits Decimal Digit BCD Excess 3 8, 4, 2, Unused bit combi nations BCD and the 2421 code are examples of weighted codes In a weighted code, each bit position is assigned a weighting factor BCD code has weights of 8, 4, 2 and code has weights of 2, 4, 2 and 1 (0110) BCD = = 6 (1101) 2421 = = 7 Prof. Wangrok Oh(CNU) Binary Codes 37 / 51
38 Binary Codes Note that some digits can be coded in two possible ways in the 2421 code: 4 = (0100) 2421 = (1010) and excess3 codes are examples of selfcomplementing codes 9 s complement of a decimal number is obtained directly by changing 1 s to 0 s and 0 s to 1 s (395) 10 = ( ) Excess3 (604) 10 = ( ) Excess3 The excess3 code has been used in some older computers because of its selfcomplementing property Excess3 is an unweighted code in which each coded combination is obtained from the corresponding binary value plus 3 The 8, 4,  2,  1 code is an example of assigning both positive and negative weights to a decimal code (0110) 8,4, 2, 1 = ( 2) + 0 ( 1) = 2 Prof. Wangrok Oh(CNU) Binary Codes 38 / 51
39 Binary Codes Gray Code 24 Chapter 1 Digital Systems and Binary Numbers Only one bit in the code group changes in going from one number to the next Table 1.6 Gray Code Gray Code Decimal Equivalent Gray code cannot be used in arithmetic circuits ASCII Character It is quite Code difficult to translate from decimal numbers to the Gray code and back to decimal again M a n y a p p l i c a t i o n s o f d i g i t a l c o m p u t e r s re q u i re t h e h a n d l i n g n o t o n l y o f n u m b e r s, b u t also of other characters or symbols, such as the letters of the alphabet. For instance, consider a high tech company with thousands of employees. To represent the names Prof. Wangrok Oh(CNU) Binary Codes 39 / 51
40 Gray Code Binary Codes Generation of Gray code Gray code for n bits can be generated recursively by prefixing a binary 0 to the Gray code for n1 bits, then prefixing a binary 1 to the reflected Generation of Gray code: I 1 Copy 2 Mirroring 3 Prepending 0 s and 1 s Generation of Gray code: II Div. Electrical and Computer Engineering Chungnam 1 National Start University from binary notation 14 2 Copy the MSB 3 Perform exclusiveor between two adjacent bits from right to left (13) 10 = (1101) 2 (1011) Gray Prof. Wangrok Oh(CNU) Binary Codes 40 / 51
41 Binary Codes Applications of Gray code 1 Optical Shaft Prof. Wangrok Oh(CNU) Binary Codes 41 / 51
42 Binary Codes Gray Code Digital Systems DesignProf. Wan Gray codes are also used in labeling the axes of Karnau maps 2 Labelling the axes of Karnaugh maps CD AB Y=BD Div. Electrical and Computer Engineering Chungnam National University Prof. Wangrok Oh(CNU) Binary Codes 42 / 51
43 Binary Codes 3 Signal constellation mapping for digital modulation Prof. Wangrok Oh(CNU) Binary Codes 43 / 51
44 Binary Codes ASCII Character Code Many applications of digital computers require to handle characters or symbols The standard binary code for the alphanumeric characters is the American Standard Code for Information Interchange (ASCII) Seven bits to code 128 characters Refer to Table 1.7 for ASCII code table Extended ASCII is also very popular IBM ASCII 8bit code (256 symbols) Including standard ASCII characters and the additional graphics and math symbols Prof. Wangrok Oh(CNU) Binary Codes 44 / 51
45 Binary Codes AS C I I i s a s e v e n bit code, but most computers manipulate an eight bit quantity as a single unit called a byte. Therefore, ASCII characters most often are stored one per byte. The extra bit is sometimes used for other purposes, depending on the application. For example, some printers recognize eight bit ASCII characters with the most significant bit set to 0. An additional 128 eight bit characters with the most significant bit set to 1 are used for other symbols, such as the Greek alphabet or italic type font. Error Detecting Detecting Code Code To detect errors in data communication and processing, an eighth bit is sometimes added to the ASCII character to indicate its parity A parity bit is an extra bit included with a message to make the total characters number and oftheir 1 s even either and even odd or parity: odd To detect errors in data communication and processing, an eighth bit is sometimes added to the ASCII character to indicate its parity. A parity bit is an extra bit included with a message to make the total number of 1 s either even or odd. Consider the following two With even parity With odd parity ASCII A = ASCII T = In each Thecase, parity we bit insert is helpful an extra inbit detecting the leftmost errors position duringof the transmission code to produce of an even information number of 1 s from in the one character location for to even another parity or an odd number of 1 s in the character for odd parity. In general, one or the other parity is adopted, with even parity being more common. The parity bit is helpful in detecting errors during the transmission of information from one location to another. This function is handled by generating an even parity bit at the sending end for each character. The eight bit characters that include parity bits are transmitted to their destination. The parity of each character is then checked at the receiving end. If the parity of the received character is not even, then at least one bit has changed value during the transmission. This method detects one, three, or any odd com Prof. Wangrok Oh(CNU) Binary Codes 45 / 51
46 Binary Storage and Registers A binary cell is a device that possesses two stable states and is capable of storing one bit (0 or 1) of information Register A register is a group of binary cells A register with n cells can store any discrete quantity of information that contains n bits (2 n states) Register transfer A digital system is characterized by its registers and the components that perform data processing In digital systems, a register transfer operation is a basic operation transferring of binary information from one set of registers into another set of registers The transfer may be direct from one register to another or may pass through data processing circuits to perform an operation Prof. Wangrok Oh(CNU) Binary Storage and Registers 46 / 51
47 new eight bit code when the keyboard is struck again. Each eight bit character transferred the processor register preceded by a shift of the previous character to the next eight Binary Storage cells on its and left. When Registers a transfer of four characters is completed, the processor register is full, and its contents are transferred into a memory register. The content stored in the MEMORY UNIT J O H N Memory Register PROCESSOR UNIT 8 cells 8 cells 8 cells 8 cells Processor Register INPUT UNIT 8 cells Input Register Keyboard J O H N CONTROL FIGURE 1.1 Transfer of information among registers Prof. Wangrok Oh(CNU) Binary Storage and Registers 47 / 51
48 Binary Storage and Registers To process discrete quantities of information in binary form, a computer must be provided with devices that hold the data to be processed and with circuit elements that manipulate individual bits of information The device most commonly used for holding data is a register Prof. Wangrok Oh(CNU) Binary Storage and Registers 48 / 51
49 Binary Logic Binary logic: binary variables + set of logical operations There are three basic logical operations 1 AND 2 OR 3 NOT Table 1.8 Truth Tables of Logical Operations AND OR NOT x y x # y x y x + y x x Section 1.9 Binary Logic 31 Each operation produces a binary result AND and OR are the same as those used for multiplication and addition. However, binary logic should not be confused with binary arithmetic. One should realize that an arithmetic variable designates a number that may consist of many digits. A logic variable is always either 1 or 0. For example, in binary arithmetic, we have = 10 (read one plus one is equal to 2 ), whereas in binary logic, we have = 1 (read one OR one is equal to one ). Prof. Wangrok Oh(CNU) Binary Logic 49 / 51
50 Binary Logic Logic Gates Logic gates are electronic circuits that operate on one or more input signals to produce an output signal Electrical signals such as voltages or currents exist as analog signals having values over a given continuous range In a digital system, these quantities are interpreted to be either of two recognizable values: 0 or 1 The intermediate region between the allowed regions is crossed only during a state transition Prof. Wangrok Oh(CNU) Binary Logic 50 / 51
51 Binary Logic Chapter Chapter 1 1 Digital Digital Systems Systems and and Binary Numbers Volts Volts FIGURE 1.3 Signal levels for binary logic 0 values FIGURE 1.3 Signal levels for binary logic values 2 Transition occurs between these limits Transition occurs between these limits Signal range Signal for range logic 1for logic 1 Signal range for logic Signal 0 range for logic 0 The graphic symbols used to designate the three types of gates x y z x y x y z x y x (a) Twoinput AND z x gate y x (b) Twoinput OR z gate x y (c) NOT gate or inverter x x FIGURE y 1.4 y Symbols for digital logic circuits (a) Twoinput AND gate (b) Twoinput OR gate (c) NOT gate or inverter Prof. Wangrok Oh(CNU) Binary Logic 51 / 51 x x
Lecture (02) Operations on numbering systems
Lecture (02) Operations on numbering systems By: Dr. Ahmed ElShafee ١ Dr. Ahmed ElShafee, ACU : Spring 2018, CSE202 Logic Design I Complements of a number Complements are used in digital computers to simplify
More informationLogic Circuits I ECE 1411 Thursday 4:45pm7:20pm. Nathan Pihlstrom.
Logic Circuits I ECE 1411 Thursday 4:45pm7:20pm Nathan Pihlstrom www.uccs.edu/~npihlstr My Background B.S.E.E. from Colorado State University M.S.E.E. from Colorado State University M.B.A. from UCCS Ford
More informationChapter 1. Digital Systems and Binary Numbers
Chapter 1. Digital Systems and Binary Numbers Tong In Oh 1 1.1 Digital Systems Digital age Characteristic of digital system Generality and flexibility Represent and manipulate discrete elements of information
More informationCHAPTER TWO. Data Representation ( M.MORRIS MANO COMPUTER SYSTEM ARCHITECTURE THIRD EDITION ) IN THIS CHAPTER
1 CHAPTER TWO Data Representation ( M.MORRIS MANO COMPUTER SYSTEM ARCHITECTURE THIRD EDITION ) IN THIS CHAPTER 21 Data Types 22 Complements 23 FixedPoint Representation 24 FloatingPoint Representation
More informationKorea University of Technology and Education
MEC52 디지털공학 Binary Systems JeeHwan Ryu School of Mechanical Engineering Binary Numbers a 5 a 4 a 3 a 2 a a.a  a 2 a 3 base or radix = a n r n a n r n...a 2 r 2 a ra a  r  a 2 r 2...a m r m
More informationDigital Systems and Binary Numbers
Digital Systems and Binary Numbers ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C. Spring, 2018 ldvan@cs.nctu.edu.tw http://www.cs.nctu.edu.tw/~ldvan/ Outline
More informationLecture (03) Binary Codes Registers and Logic Gates
Lecture (03) Binary Codes Registers and Logic Gates By: Dr. Ahmed ElShafee Binary Codes Digital systems use signals that have two distinct values and circuit elements that have two stable states. binary
More informationCS 121 Digital Logic Design. Chapter 1. Teacher Assistant. Hadeel AlAteeq
CS 121 Digital Logic Design Chapter 1 Teacher Assistant Hadeel AlAteeq Announcement DON T forgot to SIGN your schedule OR you will not be allowed to attend next lecture. Communication Office hours (8
More informationDIGITAL SYSTEM DESIGN
DIGITAL SYSTEM DESIGN UNIT I: Introduction to Number Systems and Boolean Algebra Digital and Analog Basic Concepts, Some history of Digital SystemsIntroduction to number systems, Binary numbers, Number
More informationBINARY SYSTEM. Binary system is used in digital systems because it is:
CHAPTER 2 CHAPTER CONTENTS 2.1 Binary System 2.2 Binary Arithmetic Operation 2.3 Signed & Unsigned Numbers 2.4 Arithmetic Operations of Signed Numbers 2.5 Hexadecimal Number System 2.6 Octal Number System
More informationDigital Systems and Binary Numbers
Digital Systems and Binary Numbers Mano & Ciletti Chapter 1 By Suleyman TOSUN Ankara University Outline Digital Systems Binary Numbers NumberBase Conversions Octal and Hexadecimal Numbers Complements
More informationLecture 2: Number Systems
Lecture 2: Number Systems Syed M. Mahmud, Ph.D ECE Department Wayne State University Original Source: Prof. Russell Tessier of University of Massachusetts Aby George of Wayne State University Contents
More informationLecture (01) Digital Systems and Binary Numbers By: Dr. Ahmed ElShafee
١ Lecture (01) Digital Systems and Binary Numbers By: Dr. Ahmed ElShafee Digital systems Digital systems are used in communication, business transactions, traffic control, spacecraft guidance, medical
More informationBinary Systems and Codes
1010101010101010101010101010101010101010101010101010101010101010101010101010101010 1010101010101010101010101010101010101010101010101010101010101010101010101010101010 1010101010101010101010101010101010101010101010101010101010101010101010101010101010
More informationDigital Fundamentals
Digital Fundamentals Tenth Edition Floyd Chapter 2 2009 Pearson Education, Upper 2008 Pearson Saddle River, Education NJ 07458. All Rights Reserved Decimal Numbers The position of each digit in a weighted
More informationChap 1. Digital Computers and Information
Chap 1. Digital Computers and Information Spring 004 Overview Digital Systems and Computer Systems Information Representation Number Systems [binary, octal and hexadecimal] Arithmetic Operations Base Conversion
More informationLecture (01) Introduction Number Systems and Conversion (1)
Lecture (01) Introduction Number Systems and Conversion (1) By: Dr. Ahmed ElShafee ١ Digital systems Digital systems are used in communication, business transactions, traffic control, spacecraft guidance,
More informationComputer Sc. & IT. Digital Logic. Computer Sciencee & Information Technology. 20 Rank under AIR 100. Postal Correspondence
GATE Postal Correspondence Computer Sc. & IT 1 Digital Logic Computer Sciencee & Information Technology (CS) 20 Rank under AIR 100 Postal Correspondence Examination Oriented Theory, Practice Set Key concepts,
More informationLogic and Computer Design Fundamentals. Chapter 1 Digital Computers and Information
Logic and Computer Design Fundamentals Chapter 1 Digital Computers and Information Overview Digital Systems and Computer Systems Information Representation Number Systems [binary, octal and hexadecimal]
More informationDigital Fundamentals. CHAPTER 2 Number Systems, Operations, and Codes
Digital Fundamentals CHAPTER 2 Number Systems, Operations, and Codes Decimal Numbers The decimal number system has ten digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9 The decimal numbering system has a base of
More informationReview of Number Systems
Review of Number Systems The study of number systems is important from the viewpoint of understanding how data are represented before they can be processed by any digital system including a digital computer.
More informationCHW 261: Logic Design
CHW 261: Logic Design Instructors: Prof. Hala Zayed Dr. Ahmed Shalaby http://www.bu.edu.eg/staff/halazayed14 http://bu.edu.eg/staff/ahmedshalaby14# Slide 1 Slide 2 Slide 3 Digital Fundamentals CHAPTER
More informationChapter 3: Number Systems and Codes. Textbook: Petruzella, Frank D., Programmable Logic Controllers. McGraw Hill Companies Inc.
Chapter 3: Number Systems and Codes Textbook: Petruzella, Frank D., Programmable Logic Controllers. McGraw Hill Companies Inc., 5 th edition Decimal System The radix or base of a number system determines
More informationDIGITAL SYSTEM FUNDAMENTALS (ECE 421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE 422) COURSE / CODE NUMBER SYSTEM
COURSE / CODE DIGITAL SYSTEM FUNDAMENTALS (ECE 421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE 422) NUMBER SYSTEM A considerable subset of digital systems deals with arithmetic operations. To understand the
More informationLOGIC DESIGN. Dr. Mahmoud Abo_elfetouh
LOGIC DESIGN Dr. Mahmoud Abo_elfetouh Course objectives This course provides you with a basic understanding of what digital devices are, how they operate, and how they can be designed to perform useful
More informationEEM 232 Digital System I
EEM 232 Digital System I Instructor : Assist. Prof. Dr. Emin Germen egermen@anadolu.edu.tr Course Book : Logic and Computer Design Fundamentals by Mano & Kime Third Ed/Fourth Ed.. Pearson Grading 1 st
More informationECE 20B, Winter Purpose of Course. Introduction to Electrical Engineering, II. Administration
ECE 20B, Winter 2003 Introduction to Electrical Engineering, II Instructor: Andrew B Kahng (lecture) Email: abk@eceucsdedu Telephone: 8588224884 office, 8583530550 cell Office: 3802 AP&M Lecture: TuThu
More informationChapter 2. Data Representation in Computer Systems
Chapter 2 Data Representation in Computer Systems Chapter 2 Objectives Understand the fundamentals of numerical data representation and manipulation in digital computers. Master the skill of converting
More informationMC1601 Computer Organization
MC1601 Computer Organization Unit 1 : Digital Fundamentals Lesson1 : Number Systems and Conversions (KSB) (MCA) (200912/ODD) (200910/1 A&B) Coverage  Lesson1 Shows how various data types found in digital
More informationComputer Organization
Computer Organization Register Transfer Logic Number System Department of Computer Science Missouri University of Science & Technology hurson@mst.edu 1 Decimal Numbers: Base 10 Digits: 0, 1, 2, 3, 4, 5,
More informationD I G I T A L C I R C U I T S E E
D I G I T A L C I R C U I T S E E Digital Circuits Basic Scope and Introduction This book covers theory solved examples and previous year gate question for following topics: Number system, Boolean algebra,
More informationExcerpt from: Stephen H. Unger, The Essence of Logic Circuits, Second Ed., Wiley, 1997
Excerpt from: Stephen H. Unger, The Essence of Logic Circuits, Second Ed., Wiley, 1997 APPENDIX A.1 Number systems and codes Since tenfingered humans are addicted to the decimal system, and since computers
More informationNumbering systems. Dr Abu Arqoub
Numbering systems The decimal numbering system is widely used, because the people Accustomed (معتاد) to use the hand fingers in their counting. But with the development of the computer science another
More informationDigital Fundamentals
Digital Fundamentals Tenth Edition Floyd Chapter 1 Modified by Yuttapong Jiraraksopakun Floyd, Digital Fundamentals, 10 th 2008 Pearson Education ENE, KMUTT ed 2009 Analog Quantities Most natural quantities
More informationDigital Fundamentals
Digital Fundamentals Tenth Edition Floyd Chapter 2 2009 Pearson Education, Upper 2008 Pearson Saddle River, Education NJ 07458. All Rights Reserved Quiz 2 Agenda Lecture: Chapter 2 (27 through 211):
More informationDIGITAL ARITHMETIC: OPERATIONS AND CIRCUITS
C H A P T E R 6 DIGITAL ARITHMETIC: OPERATIONS AND CIRCUITS OUTLINE 6 Binary Addition 62 Representing Signed Numbers 63 Addition in the 2 s Complement System 64 Subtraction in the 2 s Complement
More informationNumeral Systems. Numeral System Positional systems Decimal Binary Octal. Subjects:
Numeral Systems Numeral System Positional systems Decimal Binary Octal Subjects: Introduction A numeral system (or system of numeration) is a writing system for expressing numbers, that is a mathematical
More informationChapter 1 Review of Number Systems
1.1 Introduction Chapter 1 Review of Number Systems Before the inception of digital computers, the only number system that was in common use is the decimal number system which has a total of 10 digits
More informationGet Free notes at ModuleI One s Complement: Complement all the bits.i.e. makes all 1s as 0s and all 0s as 1s Two s Complement: One s complement+1 SIGNED BINARY NUMBERS Positive integers (including zero)
More informationNumber Systems and Conversions UNIT 1 NUMBER SYSTEMS & CONVERSIONS. Number Systems (2/2) Number Systems (1/2) Iris HuiRu Jiang Spring 2010
Contents Number systems and conversion Binary arithmetic Representation of negative numbers Addition of two s complement numbers Addition of one s complement numbers Binary s Readings Unit.~. UNIT NUMBER
More informationElectronics Engineering ECE / E & T
STUDENT COPY DIGITAL ELECTRONICS 1 SAMPLE STUDY MATERIAL Electronics Engineering ECE / E & T Postal Correspondence Course GATE, IES & PSUs Digital Electronics 2015 ENGINEERS INSTITUTE OF INDIA. All Rights
More informationPositional Number System
Positional Number System A number is represented by a string of digits where each digit position has an associated weight. The weight is based on the radix of the number system. Some common radices: Decimal.
More informationNumber System. Introduction. Decimal Numbers
Number System Introduction Number systems provide the basis for all operations in information processing systems. In a number system the information is divided into a group of symbols; for example, 26
More informationUNIT  I: COMPUTER ARITHMETIC, REGISTER TRANSFER LANGUAGE & MICROOPERATIONS
UNIT  I: COMPUTER ARITHMETIC, REGISTER TRANSFER LANGUAGE & MICROOPERATIONS (09 periods) Computer Arithmetic: Data Representation, Fixed Point Representation, Floating Point Representation, Addition and
More informationSE311: Design of Digital Systems
SE311: Design of Digital Systems Lecture 3: Complements and Binary arithmetic Dr. Samir AlAmer (Term 041) SE311_Lec3 (c) 2004 ALAMER ١ Outlines Complements Signed Numbers Representations Arithmetic Binary
More informationBinary Codes. Dr. Mudathir A. Fagiri
Binary Codes Dr. Mudathir A. Fagiri Binary System The following are some of the technical terms used in binary system: Bit: It is the smallest unit of information used in a computer system. It can either
More informationBinary Addition. Add the binary numbers and and show the equivalent decimal addition.
Binary Addition The rules for binary addition are 0 + 0 = 0 Sum = 0, carry = 0 0 + 1 = 0 Sum = 1, carry = 0 1 + 0 = 0 Sum = 1, carry = 0 1 + 1 = 10 Sum = 0, carry = 1 When an input carry = 1 due to a previous
More informationElectronic Data and Instructions
Lecture 2  The information Layer Binary Values and Number Systems, Data Representation. Know the different types of numbers Describe positional notation Convert numbers in other bases to base 10 Convert
More informationDigital Logic Lecture 2 Number Systems
Digital Logic Lecture 2 Number Systems By Ghada AlMashaqbeh The Hashemite University Computer Engineering Department Outline Introduction. Basic definitions. Number systems types. Conversion between different
More informationNumber Systems Base r
King Fahd University of Petroleum & Minerals Computer Engineering Dept COE 2 Fundamentals of Computer Engineering Term 22 Dr. Ashraf S. Hasan Mahmoud Rm 2244 Ext. 724 Email: ashraf@ccse.kfupm.edu.sa 3/7/23
More informationin this web service Cambridge University Press
97805185748  Switching and Finite Automata Theory, Third Edition Part 1 Preliminaries 97805185748  Switching and Finite Automata Theory, Third Edition CHAPTER 1 Number systems and codes This
More informationMs Sandhya Rani Dash UNIT 2: NUMBER SYSTEM AND CODES. 1.1 Introduction
Ms Sandhya Rani Dash UNIT 2: NUMBER SYSTEM AND CODES Structure 2.1 Introduction 2.2 Objectives 2.3 Binary Numbers 2.3.1 BinarytoDecimal conversion 2.3.2 DecimaltoBinary Conversion 2.4 Octal Numbers
More information9/3/2015. Data Representation II. 2.4 Signed Integer Representation. 2.4 Signed Integer Representation
Data Representation II CMSC 313 Sections 01, 02 The conversions we have so far presented have involved only unsigned numbers. To represent signed integers, computer systems allocate the highorder bit
More informationNumber Systems. Dr. Tarek A. Tutunji Philadelphia University, Jordan
Number Systems Dr. Tarek A. Tutunji Philadelphia University, Jordan Number Systems Programmable controllers use binary numbers in one form or another to represent various codes and quantities. Every number
More informationCOE 202: Digital Logic Design Number Systems Part 2. Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:
COE 0: Digital Logic Design Number Systems Part Dr. Ahmad Almulhem Email: ahmadsm AT kfupm Phone: 8607554 Office: 34 Objectives Arithmetic operations: Binary number system Other number systems Base Conversion
More informationNumber representations
Number representations Number bases Three number bases are of interest: Binary, Octal and Hexadecimal. We look briefly at conversions among them and between each of them and decimal. Binary Basetwo, or
More informationCombinational Logic. Prof. Wangrok Oh. Dept. of Information Communications Eng. Chungnam National University. Prof. Wangrok Oh(CNU) 1 / 93
Combinational Logic Prof. Wangrok Oh Dept. of Information Communications Eng. Chungnam National University Prof. Wangrok Oh(CNU) / 93 Overview Introduction 2 Combinational Circuits 3 Analysis Procedure
More informationAgenda EE 224: INTRODUCTION TO DIGITAL CIRCUITS & COMPUTER DESIGN. Lecture 1: Introduction. Go over the syllabus 3/31/2010
// EE : INTRODUCTION TO DIGITAL CIRCUITS & COMPUTER DESIGN Lecture : Introduction /9/ Avinash Kodi, kodi@ohio.edu Agenda Go over the syllabus Introduction ti to Digital it Systems // Why Digital Systems?
More informationDLD VIDYA SAGAR P. potharajuvidyasagar.wordpress.com. Vignana Bharathi Institute of Technology UNIT 1 DLD P VIDYA SAGAR
UNIT I Digital Systems: Binary Numbers, Octal, Hexa Decimal and other base numbers, Number base conversions, complements, signed binary numbers, Floating point number representation, binary codes, error
More informationNUMBER SYSTEMS AND CODES
C H A P T E R 69 Learning Objectives Number Systems The Decimal Number System Binary Number System Binary to Decimal Conversion Binary Fractions DoubleDadd Method Decimal to Binary Conversion Shifting
More information10.1. Unit 10. Signed Representation Systems Binary Arithmetic
0. Unit 0 Signed Representation Systems Binary Arithmetic 0.2 BINARY REPRESENTATION SYSTEMS REVIEW 0.3 Interpreting Binary Strings Given a string of s and 0 s, you need to know the representation system
More informationMoodle WILLINGDON COLLEGE SANGLI. ELECTRONICS (B. Sc.I) Introduction to Number System
Moodle 1 WILLINGDON COLLEGE SANGLI ELECTRONICS (B. Sc.I) Introduction to Number System E L E C T R O N I C S Introduction to Number System and Codes Moodle developed By Dr. S. R. Kumbhar Department of
More informationDigital Systems COE 202. Digital Logic Design. Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals
Digital Systems COE 202 Digital Logic Design Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals Welcome to COE 202 Course Webpage: http://faculty.kfupm.edu.sa/coe/mudawar/coe202/ Lecture
More informationIT 1204 Section 2.0. Data Representation and Arithmetic. 2009, University of Colombo School of Computing 1
IT 1204 Section 2.0 Data Representation and Arithmetic 2009, University of Colombo School of Computing 1 What is Analog and Digital The interpretation of an analog signal would correspond to a signal whose
More informationCHAPTER V NUMBER SYSTEMS AND ARITHMETIC
CHAPTER V1 CHAPTER V CHAPTER V NUMBER SYSTEMS AND ARITHMETIC CHAPTER V2 NUMBER SYSTEMS RADIXR REPRESENTATION Decimal number expansion 73625 10 = ( 7 10 4 ) + ( 3 10 3 ) + ( 6 10 2 ) + ( 2 10 1 ) +(
More informationMACHINE LEVEL REPRESENTATION OF DATA
MACHINE LEVEL REPRESENTATION OF DATA CHAPTER 2 1 Objectives Understand how integers and fractional numbers are represented in binary Explore the relationship between decimal number system and number systems
More informationCOMBINATIONAL LOGIC CIRCUITS
COMBINATIONAL LOGIC CIRCUITS 4.1 INTRODUCTION The digital system consists of two types of circuits, namely: (i) Combinational circuits and (ii) Sequential circuits A combinational circuit consists of logic
More informationChapter 3: part 3 Binary Subtraction
Chapter 3: part 3 Binary Subtraction Iterative combinational circuits Binary adders Half and full adders Ripple carry and carry lookahead adders Binary subtraction Binary addersubtractors Signed binary
More informationNumber Systems CHAPTER Positional Number Systems
CHAPTER 2 Number Systems Inside computers, information is encoded as patterns of bits because it is easy to construct electronic circuits that exhibit the two alternative states, 0 and 1. The meaning of
More informationChapter 4 Arithmetic Functions
Logic and Computer Design Fundamentals Chapter 4 Arithmetic Functions Charles Kime & Thomas Kaminski 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Overview Iterative combinational
More informationCS & IT Conversions. Magnitude 10,000 1,
CS & IT Conversions There are several number systems that you will use when working with computers. These include decimal, binary, octal, and hexadecimal. Knowing how to convert between these number systems
More informationChapter 2. Positional number systems. 2.1 Signed number representations Signed magnitude
Chapter 2 Positional number systems A positional number system represents numeric values as sequences of one or more digits. Each digit in the representation is weighted according to its position in the
More informationComputer Organization
Computer Organization It describes the function and design of the various units of digital computers that store and process information. It also deals with the units of computer that receive information
More informationDec Hex Bin ORG ; ZERO. Introduction To Computing
Dec Hex Bin 0 0 00000000 ORG ; ZERO Introduction To Computing OBJECTIVES this chapter enables the student to: Convert any number from base 2, base 10, or base 16 to any of the other two bases. Add and
More informationDigital Logic. The Binary System is a way of writing numbers using only the digits 0 and 1. This is the method used by the (digital) computer.
Digital Logic 1 Data Representations 1.1 The Binary System The Binary System is a way of writing numbers using only the digits 0 and 1. This is the method used by the (digital) computer. The system we
More informationBits, Words, and Integers
Computer Science 52 Bits, Words, and Integers Spring Semester, 2017 In this document, we look at how bits are organized into meaningful data. In particular, we will see the details of how integers are
More information(+A) + ( B) + (A B) (B A) + (A B) ( A) + (+ B) (A B) + (B A) + (A B) (+ A) (+ B) + (A  B) (B A) + (A B) ( A) ( B) (A B) + (B A) + (A B)
COMPUTER ARITHMETIC 1. Addition and Subtraction of Unsigned Numbers The direct method of subtraction taught in elementary schools uses the borrowconcept. In this method we borrow a 1 from a higher significant
More informationUNIT 2 NUMBER SYSTEM AND PROGRAMMING LANGUAGES
UNIT 2 NUMBER SYSTEM AND PROGRAMMING LANGUAGES Structure 2.0 Introduction 2.1 Unit Objectives 2.2 Number Systems 2.3 Bits and Bytes 2.4 Binary Number System 2.5 Decimal Number System 2.6 Octal Number System
More informationUNIT 7A Data Representation: Numbers and Text. Digital Data
UNIT 7A Data Representation: Numbers and Text 1 Digital Data 10010101011110101010110101001110 What does this binary sequence represent? It could be: an integer a floating point number text encoded with
More informationChapter 2 Number Systems and Codes Dr. Xu
Chapter 2 Number Systems and Codes Dr. Xu Chapter 2 Objectives Selected areas covered in this chapter: Converting between number systems. Decimal, binary, hexadecimal. Advantages of the hexadecimal number
More informationBinary. Hexadecimal BINARY CODED DECIMAL
Logical operators Common arithmetic operators, like plus, minus, multiply and divide, works in any number base but the binary number system provides some further operators, called logical operators. Meaning
More informationSlide Set 1. for ENEL 339 Fall 2014 Lecture Section 02. Steve Norman, PhD, PEng
Slide Set 1 for ENEL 339 Fall 2014 Lecture Section 02 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary Fall Term, 2014 ENEL 353 F14 Section
More informationChapter 2: Number Systems
Chapter 2: Number Systems Logic circuits are used to generate and transmit 1s and 0s to compute and convey information. This twovalued number system is called binary. As presented earlier, there are many
More informationCOMPUTER ORGANIZATION AND ARCHITECTURE
COMPUTER ORGANIZATION AND ARCHITECTURE For COMPUTER SCIENCE COMPUTER ORGANIZATION. SYLLABUS AND ARCHITECTURE Machine instructions and addressing modes, ALU and datapath, CPU control design, Memory interface,
More informationModule 10. Encoder. Table of Contents
1 Module 10 Encoder Table of Contents 1. Introduction 2. Code converters 3. Basics of Encoder 3.1 Linear encoders 3.1.1 Octal to binary encoder 3.1.2 Decimal to BCD encoder 3.1.3 Hexadecimal to binary
More informationAnnouncement. (CSC3501) Lecture 3 (22 Jan 2008) Today, 1 st homework will be uploaded at our class website. SeungJong Park (Jay)
Computer Architecture (CSC3501) Lecture 3 (22 Jan 2008) SeungJong Park (Jay) http://www.csc.lsu.edu/~sjpark 1 Announcement Today, 1 st homework will be uploaded at our class website Due date is the beginning
More informationLevel ISA3: Information Representation
Level ISA3: Information Representation 1 Information as electrical current At the lowest level, each storage unit in a computer s memory is equipped to contain either a high or low voltage signal Each
More informationThus needs to be a consistent method of representing negative numbers in binary computer arithmetic operations.
Signed Binary Arithmetic In the real world of mathematics, computers must represent both positive and negative binary numbers. For example, even when dealing with positive arguments, mathematical operations
More informationChapter 2. Data Representation in Computer Systems
Chapter 2 Data Representation in Computer Systems Chapter 2 Objectives Understand the fundamentals of numerical data representation and manipulation in digital computers. Master the skill of converting
More informationCHAPTER 2 (b) : AND CODES
DKT 122 / 3 DIGITAL SYSTEMS 1 CHAPTER 2 (b) : NUMBER SYSTEMS OPERATION AND CODES m.rizal@unimap.edu.my sitizarina@unimap.edu.my DECIMAL VALUE OF SIGNED NUMBERS SIGNMAGNITUDE: Decimal values of +ve & ve
More informationMemory Addressing, Binary, and Hexadecimal Review
C++ By A EXAMPLE Memory Addressing, Binary, and Hexadecimal Review You do not have to understand the concepts in this appendix to become wellversed in C++. You can master C++, however, only if you spend
More informationThe Gray Code. Script
Course: B.Sc. Applied Physical Science (Computer Science) Year & Sem.: IInd Year, Sem  IIIrd Subject: Computer Science Paper No.: IX Paper Title: Computer System Architecture Lecture No.: 9 Lecture Title:
More informationNumber Systems Prof. Indranil Sen Gupta Dept. of Computer Science & Engg. Indian Institute of Technology Kharagpur Number Representation
Number Systems Prof. Indranil Sen Gupta Dept. of Computer Science & Engg. Indian Institute of Technology Kharagpur 1 Number Representation 2 1 Topics to be Discussed How are numeric data items actually
More informationLOGIC CIRCUITS. Kirti P_Didital Design 1
LOGIC CIRCUITS Kirti P_Didital Design 1 Introduction The digital system consists of two types of circuits, namely (i) Combinational circuits and (ii) Sequential circuit A combinational circuit consists
More informationUNITII. Part2: CENTRAL PROCESSING UNIT
Page1 UNITII Part2: CENTRAL PROCESSING UNIT Stack Organization Instruction Formats Addressing Modes Data Transfer And Manipulation Program Control Reduced Instruction Set Computer (RISC) Introduction:
More informationFundamentals of Programming (C)
Borrowed from lecturer notes by Omid Jafarinezhad Fundamentals of Programming (C) Group 8 Lecturer: Vahid Khodabakhshi Lecture Number Systems Department of Computer Engineering Outline Numeral Systems
More informationCHAPTER 2 Data Representation in Computer Systems
CHAPTER 2 Data Representation in Computer Systems 2.1 Introduction 37 2.2 Positional Numbering Systems 38 2.3 Decimal to Binary Conversions 38 2.3.1 Converting Unsigned Whole Numbers 39 2.3.2 Converting
More informationELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE278: Digital Logic Design Fall Notes  Unit 4. hundreds.
ECE78: Digital Logic Design Fall 6 UNSIGNED INTEGER NUMBERS Notes  Unit 4 DECIMAL NUMBER SYSTEM A decimal digit can take values from to 9: Digitbydigit representation of a positive integer number (powers
More informationCOMPUTER ARCHITECTURE AND ORGANIZATION. Operation Add Magnitudes Subtract Magnitudes (+A) + ( B) + (A B) (B A) + (A B)
Computer Arithmetic Data is manipulated by using the arithmetic instructions in digital computers. Data is manipulated to produce results necessary to give solution for the computation problems. The Addition,
More informationCHAPTER 2 Data Representation in Computer Systems
CHAPTER 2 Data Representation in Computer Systems 2.1 Introduction 37 2.2 Positional Numbering Systems 38 2.3 Decimal to Binary Conversions 38 2.3.1 Converting Unsigned Whole Numbers 39 2.3.2 Converting
More information