



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Handout Notes for student containing the teacher handout and exam capsules
Typology: Exercises
1 / 5
This page cannot be seen from the preview
Don't miss anything!




The term “data” refers to factual information used for analysis or reasoning. The data types found in the registers of digital computers may be classified as being one of the following categories: (1) Numbers used in arithmetic computation, (2) Letters of the alphabet used in data processing, (3) Other discrete symbols used for specific purposes. Data are numbers and other binary-coded information that are operated on to achieve required computational results.
Number System i) Decimal Base, or radix (r) = 10 10 symbols: 0,1,2,3,4,5,6,7,8, E.g. 630.5 = 610^2 + 310^1 + 010^0 + 510- ii) Binary r = 2 2 symbols: 0, E.g. 110010.01 = 12^5 + 12^4 + 02^3 + 02^2 + 12^1 + 02^0 + 02-1^ + 12- iii) Octal r = 8 8 symbols: 0,1,2,3,4,5,6, E.g. (736.4) 8 = 78^2 + 38^1 + 68^0 + 48- iv) Hexadecimal r = 16 16 symbols: 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F E.g. A9D = A16^2 + 916^1 + D*16^0
Conversion i) Base r to decimal Multiply each coefficient with corresponding power of r and add. ii) Decimal to base r Divide by base r and collect remainder upwards. But, Converting decimal fraction to binary, multiplication is used instead of division. And, integers are calculated instead of remainders. Those remainders are collected downwards. E.g. (0.625) 10 = (?) 2 Integer Fraction Coefficient 0.625*2 1 0.25 1 0 1
Therefore, (0.625) 10 = (0.101) 2 H/W, (65.553) 10 = (?) 2
iii) Binary to octal (hexadecimal) & vice versa Conversion from binary to octal (hexadecimal) is accomplished by partitioning the binary number into group of 3 (for octal) or 4 (for hexadecimal) digits each starting from binary point (.) & proceeding to the left and to the right. E.g. (1 101 001. 111) 2 = (151.7) 8 (0110 1001. 1101 0) 2 = (69.D) 16 Converting from octal (hexadecimal) to binary is done by process in reverse above. E.g. (673.124) 8 = (110 111 011. 001 010 100) 2 (306.D) 16 = (11 0000 0110. 1101) 2
H/W Alphanumeric code (ASCII)
Complements are used in digital systems for simplifying the subtraction operation and for logic manipulation. Two types of complements are: i) r’s complement ii) (r-1)’s complement
i) r’s complement r’s complement of N (positive number with base r) is defined as rn^ – N, for N 0 and 0, for N= where, n=number of digits (integer parts only) E.g. (147.53)10, c = 10^3 – 147.53 = 852.47 Ans. ii) (r-1)’s complement (r-1)’s complement of N (positive number with base r) is defined as (rn^ – r-m) – N, for number with fraction (rn^ – 1) – N, for number with integer only where, n number of digits in integer part of N mnumber of digits in fraction part of N rbase or radix E.g. (147.53)9, c = 10^3 – 10 -2^ - 147.53 = 852.46 Ans.
To find (r-1)’s complement, subtract all digit from (r-1). E.g. for 1’s complement, subtract each digit from 1. for 7’s complement, subtract each digit from 7. for 9’s complement, subtract each digit from 9. for 15’s complement, subtract each digit from 15.
And, To find r’s complement, subtract each digit from (r-1), and then add 1 to the last digit. E.g. for 2’s complement, subtract each digit from 1, and then add 1 to the last digit. for 8’s complement, subtract each digit from 7, and then add 1 to the last digit. for 10’s complement, subtract each digit from 9, and then add 1 to the last digit.
An overflow is a problem in digital computers because the width of registers is finite. A result that contains n + 1 bits cannot be accommodated in a register with a standard length of n bits. For this reason, many computers detect the occurrence of an overflow, and when it occurs, a corresponding flip-flop is set which can then be checked by the user. The detection of an overflow after the addition of two binary numbers depends on whether the numbers are considered to be signed or unsigned. When two unsigned numbers are added, an overflow is detected from the end carry out of the most significant position. In the case of signed numbers, the leftmost bit always represents the sign, and negative numbers are in 2's complement form. When two signed numbers are added, the sign bit is treated as part of the number and the end carry does not indicate an overflow. An overflow cannot occur after an addition if one number is positive and the other is negative, since adding a positive number to a negative number produces a result that is smaller than the larger of the two original numbers. An overflow may occur if the two numbers added are both either positive or both negative. E.g.
An overflow condition can be detected by observing that if these two carries are not equal, an overflow condition is produced. If the two carries are applied to an exclusive OR (XOR) gate, an overflow will be detected when the output of the gate is equal to 1.
Floating-Point Representation has two parts: i) Mantissa (a signed number, may be a fraction or an integer) ii) Exponent E.g. +62345.54 = +(0.6234554)*10+ Fraction Exponent +0.6234554 + General form, m * re, where r = radix A floating point binary number is represented in a similar manner except that it uses base 2 for the exponent. For example, the binary number +1001.11 is represented with an 8-bit fraction and 6-bit exponent as follows: m * 2e^ = +(.100111) 2 * 2+ Fraction Exponent 01001110 000100 The fraction has a 0 in the leftmost position to denote positive. The binary point of the fraction follows the sign bit but is not shown in the register. A floating point number is said to be normalized if the most significant digit of the mantissa is nonzero. Two main standard forms of the floating point number by
where, S = sign of Mantissa E = exponent bits (in 2’s complement) M = mantissa bits E.g. 13 = 1101 = +(.1101) * 2^4 = 00000100 11010000 00000000 00000000 -17 = -10001 = -(.10001) * 2^5 = 10000101 10001000 00000000 00000000 -0.125 10 = -0.001 2 = -(.1) * 2-2^ = 11111110 10000000 00000000 00000000