## Sunday, May 20, 2007

### Question 2

Function f (x) has a parameter and a return value that are both real. Consider a procedure that consists of steps 1 through 5 shown below. After a sufficient number of cycles through this procedure, the value of y show in step 3 no longer changes. Which of the following relational expressions holds when this occurs?

step 1 x ← a
step 2 y ← f (x)
step 3 Display value of y.
step 4 x ← y

a) f (a) = y
b) f (y) = 0
c) f (y) = a
d) f (y) = Y

### Question 1

A register represents numbers in binary. Select the correct method for multiplying the positive integer x, which is stored in this register, by 10. Here, shifting does not result in overflow.

a) Add the value obtained by shifting x three bits to the left and the value obtained by shifting x two bits to the left.

b) Shift x three bits to the left, add x to the value, and then further shift this result one bit to the left.

c) Shift x two bits to the left, add x to the value, and then further shift this result one bit to the left.

d) Shift x two bits to the left, add x to the value, and the further shift this result two bits to the left.

### Question 5

There is a register using the binary system. How can a positive integer x stored in this register be increased tenfold? Assume that overflow by the shifting operation does not occur.

a) Shift x 2 bits to the left, add x to the value and the shift the result 1 bit further to the left.
b) Add the value obtained by shifting x 3 bits to the left, and another value obtained by shifting x 2 bits to left.
c) shifting x 3 bits to the left, add x to the value and then shift the result 1 bit further to the left
d) shift x 5 bits to left

### Question 4

Why are two's complements used in the binary system ?

a) They enable subtractions to be performed as additions.
b) The least significant bit of a number indicates whether the number is positive or negative.
c) They enable division to be performed with a combination of subtractions.
d) Bit inversion of the number yields the corresponding negative number.

### Question 3

When a decimal number with finite decimals are expressed in the binary system and a binary number with finite decimals are to be expressed in the decimal system, which of the following correctly describes the results ?

a) Both results yield finite decimals.
b) The former results always yields finite decimals, while the latter result always yields infinite decimals.
c) The former results always yields finite decimals, while the latter result yields either finite decimals or infinite decimals.
d) The former results yields either finite decimals or infinite decimals, while the latter result always yields finite decimals

### Question 2

When a computer is connected to a network, an ID is sometimes assigned to the computer to uniquely identify it. Assume that 8 bits are used to specify an ID in a network system. How many IDs can be used in this network ? Also assume that bit patterns "00000000" and "11111111" cannot be used as a ID.

a) 253
b) 254
c) 255
d) 256

### Question 1

What number system is used in the following calulation ?
131-45 =53

a) 6
b) 7
c) 8
d) 9

### Question 5

When logical expressions P and Q are both true, which of the following expressions is true regardless of whether the logical expression R is true or false? Here,”￢” denotes negation, “v“ denotes logical sum, “^“ denotes logical product, and “ → “ denotes implication (the dyadic boolean operation whose result is FALSE only when TRUE → FALSE)

a)
b)
c)
d)

### Question 4

When A and b are subsets of set S, which of the following represents （￢A ∩ ￢B） Here, ￢A and ￢B are complement of subsets A and B of set S respectively, and X-Y is a difference set of set X and set Y.

a) （￢A∪￢B）－（A∩B）
b) （S－A）∪（S－B）
c) ￢A－B
d) S－（A∩B）

### Question 3

X NAND Y is the negation logical product of X and Y and is defined as NOT (X AND Y). What is the logical formula for X OR Y using only NAND?

a) ((X NAND Y) NAND X) NAND Y
b) (X NAND X) NAND (Y NAND Y)
c) (X NAND Y) NAND (X NAND Y)
d) X NAND (Y NAND (X NAND Y))

### Question 2

There are tree typical ways to express negative integers, namely:
a: 2’s complement
b: 1’s complement
c: Absolute value with a sign (If the leading bit is 0, the sign is positive. If the leading bit is 1, the sign is negative)

Using methods a,b and c, three negative integers are represented as a 4-bits pattern ‘1101’. When the original numbers are arranged in ascending order, which is the correct application order of the three methods ?

a) a,b,c
b) a,c,b
c) b,c,a
d) c,a,b

### Question 1

When the following decimal fraction are converted to octal numbers, which of them becomes a finite fraction ?
a) 0.3
b) 0.4
c) 0.5
d) 0.8