Professional Documents
Culture Documents
Semester: VI
Microcontroller and OOP
Topic: Combinational Logic Design: Introduction,
Unit: I
Boolean identities, K – map
1. The Boolean theorem is A+ A=… … . .
(a) 0
(b
1
)
(c) A
(d
A
)
Answer: (b) Difficulty Level: S
2. A combinational logic circuit is a digital circuit where output depends on .......
(a) outputs
(b maxterms
)
(c) inputs
(d minterms
)
Answer: (c) Difficulty Level: S
The Boolean theorem is A . A=… …. .
(a) 1
(b 0
)
(c) A
(d A
)
Answer: (b) Difficulty Level: S
The Boolean theorem A B+ A B+ A B+ AB = ....
(a) B
(b A
)
(c) 1
(d 0
)
Answer: (c) Difficulty Level: S
There are ....... cells in a 3-variable K-map.
(a) 16
(b 2
)
(c) 4
(d 8
)
Answer: (d) Difficulty Level: S
The De Morgan Theorem is A . B . C … ..=… … … …
(a) A . B .C .… …
(b A+ B+C . … …
)
(c) A.B.C ......
(d A+B+C+ .....
)
Answer: (b) Difficulty Level: M
The De Morgan Theorem is A+ B+C …..=… … … …
(a) A . B .C .… …
(b A+ B+C . … …
)
(c) A.B.C ......
(d A+B+C+ .....
)
Answer: (a) Difficulty Level: M
Each term in SOP form is called ........ and each term in POS form is called .......
(a) minterms, maxterms
(b maxterms, minterms
)
(c) canonical form, standard form
(d standard form, canonical form
)
Answer: (a) Difficulty Level: M
It is a Boolean variable either primed or unprimed.
(a) SOP
(b POS
)
(c) Literal
(d Product term
)
Answer: (c) Difficulty Level: M
The Number of Terms in a switching function of four variables are ....
(a) 4
(b 8
)
(c) 16
(d 12
)
Answer: (c) Difficulty Level: M
Simplify the logic expression Y = A B C D+ A B C D+ A B C D
(a) AC
(b
AC D
)
(c) A C(B+ D)
(d
A C( B+ B D)
)
Answer: (d) Difficulty Level: D
For a given logical diagram, write logical expression for output.
(a) A B+ A B
(b ( A¿ B).( A B) ¿
)
(c) A B+ A B
(d AB+AB
)
Answer: (a) Difficulty Level: D
Transform canonical expression into its other canonical form in decimal notation.
F ( x , y , z )=∑ m(1 , 3 ,5)
(a) F ( x , y , z )=∑ M (0 , 2 , 4 , 6 , 7)
(b F ( x , y , z )=∏ M (1, 3 , 7)
)
(c) F ( x , y , z )=M (0 , 2 , 4 , 7)
(d F ( x , y , z )=∏ M (0 ,2 , 4 ,6 ,7)
)
Answer: (d) Difficulty Level: D
For a given logical diagram, write logical expression for output.
(a) Y = ABCD
(b Y = ABCD+ BCD
)
(c) Y =BC
(d Y =BCD
)
Answer: (c) Difficulty Level: D
Represent the expression in numerical form F ( A , B )= A B+ A B
(a) F ( A , B )=∑ m(0 , 2)
(b F ( A , B )=∏ M (0 ,3)
)
(c) F ( A , B )=m(0 , 2 ,3)
(d F ( A , B )=M (0 , 2 ,3)
)
Answer: (a) Difficulty Level: D
*S-Simple, M-Medium, D-Difficult
(a) a, b, d
(b) a, b, c
(c) all
(d) a, b, g, c, d
Answer: Option C -all Difficulty Level: M
2. In a 7 segment display, LEDs b and c lit up. The decimal number displayed is ____ .
(a) 9
(b) 7
(c) 3
(d) 1
Answer: Option D - 1 Difficulty Level: S
3. A three state switch has three outputs. These are __________ .
(a) low, low and high
12. An encoder is a combinational circuit encoding the information of ____ input lines to
____ output lines, thus producing the binary equivalent of the input.
(a) 2n ; n
(b) 2n-1 ; 2
(c) 2n+1 ; n
(d) n2 ; (n+1)
Answer: Option- a - 2n ; n Difficulty Level: M
13. A code converter is a logic circuit that _____________ .
(a) Inverts the given input
(b) Converts into decimal number
(c) Converts data of one type into another type
(d) Converts to octal
Answer: Option- C - Converts Difficulty Level: M
data of one type into another
type
14 Gray code of decimal no. (4)10 is equal to ________ and that of (15)10 is ______ .
(a) 16:1
(b) 4:1
(c) 16:2
(d) 8:1
Answer: Option- a- 16:1 Difficulty Level: S/M/D
18 0100 0010 0001 is the BCD code is equivalent to decimal_____ .
(a) 421
(b) 412
(c) 413
(d) 414
Answer: Option- a- 421 Difficulty Level: D
19 The decimal number 795 is equivalent of ____________________ BCD code.
(a) DISABLE
(b) ENABLE
(c) CLOCK
(d) VCC
Answer:Option- b- ENABLE Difficulty Level: M
(a) 2-byte
(b) 3-byte
(c) 1-byte
(d) 4-byte
(a) The contents of the D & L registers are exchanged with the H & E registers.
(b) The contents of the H & L registers are exchanged with the B & C registers.
(c) The contents of the H & L registers are exchanged with the D & E registers.
(d) The contents of the B & C registers are exchanged with the D & E registers.
(a) DAD Rp
(b) DAC Rp
(c) DAB Rp
(d) DAA Rp
4 The instruction _________________ places the flags in the top location of the stack.
(a) POP F
(b) PUSH F
(c) POP PSW
(d) PUSH PSW
Answer: PUSH PSW Difficulty Level: S/M/D
5 The instruction SPHL ______________________________________________.
(a) Copies H & L registers into the Program Counter
(b) Copies H & L registers into the Accumulator
(c) Copies H & L registers into the Stack Pointer
(d) Copies H & L registers into the Flag Register
Answer: Copies H & L registers Difficulty Level: S/M/D
into the Stack Pointer
6 The instruction PCHL _______________________________________________.
8 When a CARRY is generated while executing a set of instructions, the CARRY is added to
____ bit of the accumulator.
(a) D0
(b) D5
(c) D3
(d) D7
1. Which register holds the address for a stack whose value is supposed to be directed at
the topmost position?
(a) Stack Pointer
2. The instructions based on the stack operations are also known as 'zero address' or
'implied instructions', because _______.
(a) address gets updated automatically in stack pointer
(b) processor can refer a memory stack without specifying the address
3. What is another name of memory stack especially given for the fundamental function
performed by it?
(a) Last-in-first-out (LIFO)
(a) 0
(b) 1
(c) 2
(d) 3
(a) Modes X, Y, Z
(b) Modes A, B, C
(c) Modes 0, 1, 2
(d) Modes 1, 2, 3
(a) Port B
(b) Port D
(c) Port A
(d) Port V
(a) Port B
(b) Port Z
(c) Port D
(d) Port A
8 _______ bit of the control word format determines the mode in 8255A IC.
(a) D0
(b) D3
(c) D7
(d) D5
(a) Port C
(b) Port A
(c) Port D
(d) Port B
(b) Flag
(c) Accumulator
11. If A=85H, then after the SWAP instruction the content of accumulator becomes.
(a 58
(b) 85
(c) 58H
(d) 85H
Answer: ( c ) 58H Difficulty Level: S
12. If the initial value of register R0 is FFH, then after executing instruction in 8051 “ INC R0” ,
the content of register R0 becomes,
(a) F1H
(b) FEH
(c) 00H
(d) 01H
Answer: ( c) 00H Difficulty Level: S
13. All short jump instructions in 8051 is …………,
(a) 1-byte instruction
(b) 2-byte instruction
(c) 3 -byte instruction
(d) 4 -byte instruction
Answer: (b) 2- byte instruction Difficulty Level:S
14 LJMP is of which type of instruction?
(a) 1-byte instruction
(b) 2-byte instruction
(c) 3 -byte instruction
(d) 4 -byte instruction
Answer: (c ) 3-byte instruction Difficulty Level:S
15 In 8051, all conditional jumps are of which type?
(a) Short jump
(b) Absolute jump
(c) Long jump
(d) Loop jump
Answer: (a) Short jump Difficulty Level: M
16 In 8051, if the short jump is forward, then the target address can be within a space of….
(a) 127 bytes from the current PC
(b) 128 bytes from the current PC
(c) -127 bytes from the current PC
(d) -128 bytes from the current PC
Answer: (a) 127 bytes from the Difficulty Level: M
current PC
17 Every subroutine needs which instuction from the following as the last instruction?
(a) LCALL
(b) AJMP
(c) LJMP
(d) RET
Answer: (d) RET Difficulty Level: M
18 In using LCALL instruction, the target address of the subroutine can be anywhere within
which memory space of the 8051?
(a) 2 k-byte
(b) 8 k-byte
(c) 32 k-byte
(d) 64 k-byte
Answer: (d) 64 -byte Difficulty Level: M
19 The mnemonics DJNZ stands for……
(a) Delete and jump if not zero
(b) Delay and jump if not zero
(c) Drop and Jump if not zero
(d) Decrement and jump if not zero
Answer: (d) Decrement and Difficulty Level: D
jump if not zero
20 In 8051, if intitally A=8FH, then after executing instruction “CPL A” the content of register
becomes,
(a) F8H
(b) 81H
(c) 7FH
(d) 70H
Answer: (d) 70H Difficulty Level: D
21. When two BCD numbers are added, the answer is a non-BCD number. To get the result in
BCD, we use which instruction after addition.
(a) PUSH
(b) POP
(c) DAA
(d) ADDC A, R0
Answer: (c) DAA Difficulty Level: D
4. Which minimum mode signal is used for demultiplexing the data and address lines
with the assistance of an external latch in a microprocessor while accessing memory
segment ?
a. INTA
b. DTE
c. HOLD
d. ALE
ANSWER: d. ALE
1. Which word size is approved to be of greater importance for performing the small
computational tasks along with its storage usability feature adopted by ASCII code?
a. 4-bit
b. 8-bit
c. 16-bit
d. 32-bit
ANSWER: b. 8-bit
2. Which among the below stated statements does not exhibit the characteristic
feature of 16-bit microcontroller?
3. How are the address and data buses removed in external memory type of
microcontrollers?
1. What are the significant designing issues/factors taken into consideration for RISC
Processors?
2. What does the compact and uniform nature of instructions in RISC processors
facilitate to?
a. compiler optimization
b. pipelining
c. large memory footprints
d. none of the above
ANSWER: b. pipelining
3. Which processor has the necessity of manual optimization for the generation of
assembly language code especially for the embedded systems?
a. RISC
b. CISC
c. Both a & b
d. None of the above
ANSWER: b. CISC
a. Local Register
b. Temporary Register
c. Parameter Register
d. All of the above
1. Which architectural scheme has a provision of two sets for address & data buses
between CPU and memory?
a. Harvard architecture
b. Von-Neumann architecture
c. Princeton architecture
d. All of the above
4. Which feature deals with the fetching of next instruction during the execution of
current instruction irrespective of the memory access?
a. Fetching
b. Pre-fetching
c. Fetch & Decoding
d. All of the above
ANSWER: b. Pre-fetching
(a) 8H
(b) 9H
(c) 7H
(d) 6H
3. Which pin of port 3 is has an alternative function as write control signal for
(a) P3.8
(b) P3.3
(c) P3.6
(d) P3.1
(a) 00H-77H
(b) 40H-80H
(c) 00H-FFH
(d) 80H-FFH
(a) MOV A, Rn
(c) MOV A, @ Ri
12 MOV A, #56H
XCHD A, @R1
13 In modes 2 and 3, if _____ bit of SCON bit is set will causes enable multiprocessor
communication and is of ____ bit address.
(a) The watchdog Timer is an external timer that resets the system if the software
fails to operate properly.
(b) The watchdog Timer is an internal timer that sets the system if the software
fails to operate properly.
(c) The watchdog Timer is an internal timer that resets the system if the software
fails to operate properly.
15 If the __ pin is ___ , then we have the option of using the ____ ROM or EPROM
together with _____ memory and devices.
(a) start()
(b) system()
(c) main()
(d) program()
Answer: main() Difficulty Level: S
2. What punctuation is used to signal the beginning and end of code blocks?
(a) {}
(b) -> and <-
(c) BEGIN and END
(d) ( and )
Answer: { } Difficulty Level: S
3. What punctuation ends most lines of C++ code?
(a) . (dot)
(b) ; (semi-colon)
(c) : (colon)
(d) ' (single quote)
Answer: ; (semi-colon) Difficulty Level: S
4 Which of the following is a correct comment?
(a) */ Comments */
(b) ** Comment **
(c) /* Comment */
(d) { Comment }
Answer: /* Comment */ Difficulty Level: S
5 Which of the following is not a correct variable type?
(a) float
(b) real
(c) int
(d) double
Answer: real Difficulty Level: M
6 Which of the following is the correct operator to compare two variables?
(a) :=
(b) =
(c) equal
(d) ==
Answer: == Difficulty Level: S
7 To increase the value of c by one which of the following statement is wrong?
(a) c++
(b) c=c+1
(c) c + 1 => c
(d) c += 1
Answer: c + 1 => c Difficulty Level: M
8 When following piece of code is executed, what happens?
b = 5;
a = b++;
(a) a contains 5 and b contains 6
(b) a contains 5 and b contains 6
(c) a contains 6 and b contains 5
(d) a contains 5 and b contains 5
Answer: a contains 6 and b contains 5 Difficulty Level: D
9 What is the final value of x when the code int x; for(x=0; x<8; x++) {} is run?
(a) 8
(b) 9
(c) 0
(d) 11
Answer: 8 Difficulty Level: D
10 When does the code block following while(x<100) execute?.
(a) do while
(b) repeat until
(c) while
(d) for
Answer: repeat until Difficulty Level: S/M/D
12 How many times is a do while loop guaranteed to loop?
(a) Infinitely
(b) 0
(c) 1
(d) 2
Answer: Difficulty Level: S
13. Regarding the use of new line character (/n) and endl manipulator with cout statement.
(a) print
(b) cout
(c) cin
(d) write
Answer: cout Difficulty Level: S
15 By default, the standard output device for C++ programs is
(a) Monitor
(b) Modem
(c) Disk
(d) Printer
Answer: Monitor Difficulty Level: S
16. Identify the correct statement regarding scope of variables
(a) Global variables are declared in a separate file and accessible from any program
(b) Global variables are declared inside a function and accessible from anywhere in program
(c) Local variables are declared inside a function and accessible within the function only.
(d) Local variables are declared in the main body of the program and accessible only from
functions.
Answer: Local variables are declared inside a Difficulty Level: M
function and accessible within the function only.
17 In case of arguments passed by values when calling a function such as a=area(x,y),
(a) Any modifications to the variables x & y from inside the function will not have any effect
outside the function
(b) The variables x and y will be updated when any modification is done in the function
If (x = 10)
(a) Indo structure the condition is tested at the beginning of first iteration
(b) The do structure decides whether to start the loop code or not whereas while
statement decides whether to repeat the code or not
(c) In while structure condition is tested before executing statements inside loop
whereas in do structure condition is tested before repeating the statements inside
loop
(d) In while statement the condition is tested at the end of first iteration
(a) break
(b) goto
(c) Switch
(d) exit
(a) &
(b) |
(c) &&
(d) |&
Answer: && Difficulty Level: S
22 The directives for the preprocessors begin with
d.
(a) break
(b) exit
(c) goto
(d) switch
Answer: switch Difficulty Level: S
24 A block comment can be written by
(a) 68.0
(b) 24.0
(c) incorrect expression so there is no value
(d) 32.0
Answer: 24.0 Difficulty Level: M
27 a>b ? a : b
(a) returns a
(b) returns whichever is greater, a or b.
(c) returns b
(d) returns 1
Answer: returns whichever Difficulty Level: D
is greater, a or b.
28 Value of sum after execution will be will
float x = 2.3
(a) 2
(b) 3
(c) 2.3
(d) 3.3
Answer:3 Difficulty Level: D
29 The break statement is used in