Computer Knowledge
Digital Logic and Microprocessors
735 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
C
Correct answer
Explanation
When a TPF program is executing, Register 9 (R9) is designated to point to the ECB (Event Control Block). The ECB contains crucial information about the program's execution context, and R9 is the architecturally defined register that holds this pointer, allowing the program to access control information.
-
while(1) { LED(On) Delay(25) LED(Off) }
-
main() { LED(On) Delay(25) LED(Off) while(1) { } }
-
while(1) { LED(On) Delay(25) LED(off) Delay(25) )
-
while(1) { Delay(25) LED(on) Delay(25) }
C
Correct answer
Explanation
To blink an LED at equal intervals indefinitely, the code must loop continuously, toggle the LED state, and apply a delay after both turning it on and turning it off. Option 569320 correctly includes delays in both states within a while(1) loop, whereas others omit crucial delays or loops.
-
Resistance is generated
-
Inductance is generated
-
Capacitance is generated
-
Current is generated
C
Correct answer
Explanation
Capacitive touch sensors like the CY8C20434 work by detecting changes in capacitance when a finger touches the PCB. The human body acts as a capacitor, and when placed near the sensor electrodes, it changes the capacitance of the circuit, which the microcontroller detects as a touch event. Option C is correct.
-
(a) Decision map
-
(b) Decision tree
-
(c) Decision table
-
(d) When rule
D
Correct answer
Explanation
When rules in Pega are specifically designed to return boolean outcomes only - either true or false. Unlike decision trees, tables, and maps which can return various data types (strings, numbers, etc.), When rules are strictly boolean conditions used for conditional logic.
-
(a) True
-
(b) False
-
Sometimes true
-
sometimes false
B
Correct answer
Explanation
Decision shapes in flowcharts require a path for each logical branch, not for every possible return value. A decision typically has 2-3 paths (yes/no, or multiple mutually exclusive conditions) regardless of how many distinct values the processing might produce. For example, a decision checking 'is x > 0' has two paths (yes/no) even though x could have infinite possible values.
-
Bitwise XOR
-
Bitwise OR
-
Logical OR
-
Logical AND
A
Correct answer
Explanation
Among the listed operators, Bitwise XOR (^) has the highest precedence. The precedence order is: Bitwise XOR (^) > Bitwise OR (|) > Logical AND (&&) > Logical OR (||). The answer is A because XOR ranks highest. Bitwise operators generally have higher precedence than logical operators, and within bitwise operators, XOR outranks OR. This affects expressions like a ^ b | c - XOR binds tighter.
-
(a) Decision map
-
(b) Decision tree
-
(c) Decision table
-
(d) When rule
D
Correct answer
Explanation
When rules (Rule-Declare-When) evaluate conditions and return only Boolean true/false results. Decision tables, trees, and maps can return various values - strings, numbers, or other data types. Only When rules are restricted to Boolean outputs.
B
Correct answer
Explanation
The statement is false - while you can create connectors for every possible return value from a Decision shape, it is not required. Pega flows can include default handling or error cases where not every return value needs an explicit connector. The best practice is to handle expected outcomes explicitly, but the system does not mandate connectors for all possible returns.
-
Mulitplying by 2*n and Dividing by 2*n
-
Dividing by 2*n and Multiplying by 2*n
-
Multiplying by n and Dividing by n
-
Dividing by n and Multiplying by n
A
Correct answer
Explanation
Left shifting by n bits multiplies by 2^n (each position shift is a power of 2). Right shifting divides by 2^n. This is fundamental to binary arithmetic.
C
Correct answer
Explanation
The MOV instruction transfers data between registers or memory locations without performing any arithmetic or logical operation. Since it doesn't modify the data, it doesn't affect processor flags like Zero, Sign, Carry, or Overflow. Instructions like ADD, SUB, and XOR perform operations that modify these flags based on their results.
A
Correct answer
Explanation
SCSI-3 employs Cyclic Redundancy Check (CRC) for robust error detection of data transferred on the bus, replacing the simpler single-bit parity used in SCSI-1 and SCSI-2. CRC can detect multiple bit errors and provides better data integrity protection. Parity was the legacy method, while CRC is the modern standard.
A
Correct answer
Explanation
SCSI-3 employs Cyclic Redundancy Check (CRC) for robust error detection of data transferred on the bus, replacing the simpler single-bit parity used in SCSI-1 and SCSI-2. CRC can detect multiple bit errors and provides better data integrity protection. Parity was the legacy method, while CRC is the modern standard.
-
It is having two ports nextval and currval
-
We can add ports in it
-
It is active and connected
-
All of the above
A
Correct answer
Explanation
The Sequence Generator transformation has exactly two ports: NEXTVAL (generates the next sequence value) and CURRVAL (returns the current sequence value). These are the only ports available and you cannot add custom ports to this transformation. It is a passive transformation and not connected to the data flow directly.
-
R1 will hold 2 and condition code is set to 0
-
R1 will hold 87, Data1 will hold 85 and condition code is set to 2.
-
Data1 will hold 87, R1 will hold 2 and condition code is set to 2.
-
None of the above
-
ADDR1 will execute until R2 becomes 0.
-
ADDR1 will execute until R2 becomes 8.
-
ADDR1 will never be executed.
-
All of the above.
A
Correct answer
Explanation
The BCTR (Branch on Count Register) instruction decrements the register (R2) by 1. If R2 is not 0, it branches. Since it loops back to ADDR1 and decrements R2, the loop at ADDR1 will execute repeatedly until the register R2 becomes 0.