Computer Knowledge

Digital Logic and Microprocessors

749 Questions

Digital logic and microprocessors form the core of computer science, covering logic gates, combinational and sequential circuits, and CPU architecture. These topics are crucial for computer knowledge sections in technical exams. Test your digital electronics basics here.

Logic gates and circuitsCombinational vs sequential circuitsMicroprocessor instructionsTruth tables and boolean functions

Digital Logic and Microprocessors Questions

Multiple choice
  1. I and II only

  2. II and III only

  3. III only

  4. All the three

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Case 1 is here of data dependency, this can't be safe with single ALU so read after write. Case 2 Conditional jumps are always hazardous they create conditional dependency in pipeline Case 3 this is write after read problem or concurrency dependency so hazardous All the three are hazardous.

Multiple choice
  1. the number of 0 bits in A0

  2. the number of 1 bits in A0

  3. A0

  4. 8

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Here value of B is incremented by 1 only if carry flag is 1, carry is filled using right rotation, so B will store the no. of 1s in A0.

Multiple choice
  1. RRC A, #1

  2. NOP ; no operation

  3. LRC A, #1 ; left rotate A through carry flag by one bit

  4. ADD A, #1

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

In the end of program execution to check whether both initial and final value of register A is A0, we need to right rotate register A through carry by one bit.

Multiple choice
  1. 5

  2. 6

  3. 7

  4. 8

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The sequential circuit has 3 variables to decide the state in which input & 2 inputs are present. Output for particular inputs decide states.

i/p op 1 op 2 State
0 0 0 Initial
0 0 1 $n_k - z_k = 2$
0 1 0 $z_k - n_k = 2$
1 0 0 Not applicable
1 0 0 Initial
1 0 1 $n_k - z_k = 2$
1 1 0 $z_k - n_k = 2$
0 0 1 $n_k - z_k = 2$
1 1 1 is correct

using 3 bits we require $ 2^3 - 1 = 7 $ states here

Multiple choice
  1. $ c_{out}\left ( \overline{a_{n-1}\oplus b_{n-1}} \right )$
  2. $ a_{n-1}b_{n-1}\overline{c_{n-1}}+\overline{a_{n-1}b_{n-1}}c_{n-1}$
  3. $ c_{out}\oplus c_{n-1}$
  4. $ a_{n-1}\oplus b_{n-1}\oplus c_{n-1}$
Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Binary adder generates C out only if

Multiple choice
  1. $ \overline{w}xz,wx\overline{y},x\overline{y}z,xyz,wyz$
  2. $ wxy, \overline{w}xz,wyz$
  3. $ wx\overline{y} \overline{z}, xz, w\overline{x}yz$
  4. $ wx\overline{y}, wyz, wxz, \overline{w}xz, x\overline{y}z, xyz$
Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Multiple choice
  1. 000

  2. 001

  3. 010

  4. 101

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

|||||| |---|---|---|---|---| | | q2| q1| q0| I/P| | initially | 0| 0| 0| -| || 0| 0| 1| 1| || 0| 1| 0| 0| || 1| 0| 0| 0| || 0| 0| 0| 1| || 0| 0| 1| 1| || 0| 1| 0| 0| || 1| 0| 0| 0| || 0| 0| 1| 0| || 0| 1| 0| 0|

Multiple choice
  1. mask $\leftarrow$ 0 ×l << pos
  2. musk $\leftarrow$ 0 × ffffffff >> pos
  3. mask $\leftarrow$pos
  4. masdk $\leftarrow$0×f
Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation