Computer Fundamentals Lecture
Computer Fundamentals Lecture
For any number expressed in base-r system wherein the For diminished radix complement:
coefficients are multiplied by powers of 10: Given:
N = number, r = base, n = no. of digit
anan-1an-2an-3 . . . . . . a2a1a0.a-1a-2a-3. . . . .a-m Then:
(r - 1)’s complement of N = (rn – 1) – N
= anrn + an-1 r n-1
+ an-2 r n-2
+ an-3 rn-3 + . . . . . . + a2r2 +
a1r1 + a0r0 For radix complement:
Given:
Example: N = number, r = base, n = no. of digit
Then:
1. For base or radix equal to 10 r’s complement of N = rn – N, if N ≠ 0
ana n-1 a n-2 a n-3 . . . . . . . a2a1a0 . a1a2a3 . . . . . . a -m (each r’s complement of N = 0, if N = 0
digit range from 0 to 9)
Laws for Boolean Algebra
n n-1 n-2
= an 10 + an-110 + an-2 10 + an-3 10 + . . . . . .+ a2 n-3 x+0=x ; x∙1=x
102 + a1 101 x + x’ = 1 ; x ∙ x’ = 0
+ a0 100 + a-110-1 + a-2 10-2 + a-3 10-3 + . . . . . .+ a-m 10-m x+x=x ; x∙x=x
x+1=1 ; x∙0=0
2. For base or radix equal to 2
anan-1 an-2 an-3. . . . . . .a2a1a0a-1a-2a-3. . . . . . .a-m (each digit Involution:
is either 0 or 1) (x’)’= x
Complements
For Boolean Expressions, the operator precedence is:
5. The largest binary number that can be obtained with 16 bits in its decimal equivalent is
A. 16166 B. 16 C. 216 D. 65535
11. For the base 10 number 30, the equivalent binary number is
A. 1110 B. 0111 C. 1111 D. 11110
17. Convert Octal (3458) to the equivalent binary coded decimal (BCD)16. Select the nearest answer.
A. 1011011001 B. 001101000101 C. 001000101001 D. 11100101
18. In digital codes, how do you identify codes running from 1-10 or from 0-9?
A. Decimal B. standard base 10 C. gray D. octal
21. When a binary point of a binary number is moved one place to the right, what happen to its value?
A. Divides by 2 B. multiplies by 2 C. increased by 10 D. multiplies by 10
22. The division of 11000 base 2 and 100 base 2 gives _______.
A. 120 B. 108 C. 110 D. 90
23. Divide (15) base 16 by (011) base 2. Express the answer in base 10.
A. 9 B. 5 C. 7 D. 3
24. In the digital codes, how do you identify codes running from 0 to 1 or run from 0 – 7?
A. Base 10 B. octal C. binary D. gray
25. What is the value of negative decimal number (– 5) to be written as signed bit, 2’s complement form?
A. 10000 B. 11011 C. 10001 D. 10011
28. Decimal 5436 when converted to radix minus one complement will become
A. 4555 B. 4356 C. 4563 D. 4653
29. What is the radix minus one complement of (BABE) base 16?
A. 5444 B. 4541 C. 4511 D. 4561
50. A 3 input AND gate followed by a NOT gate has three inputs X = ON, Y = OFF and Z ON. It output would be
A. ON B. OFF C. don’t know D. don’t care
51. In the logic circuit, what is the output of an XOR circuit, when inputs A and B is 0, 1 respectively when f = A (+)
B.
A. 00 B. 1 C. 11 D. 0
53. The binary coding scheme most commonly used in microcomputers is ________.
A. Binary code B. EBCDIC C. Baudot code D. ASCII