GATE 2019
65 questions
MCQ 41 · NAT 241-mark 30 · 2-mark 35
Questions 11–15 of 65
A certain processor uses a fully associative cache of size 16 kB, The cache block size is 16 bytes. Assume that the main memory is byte addressable and uses a 32-bit address. How many bits are required for the Tag and the Index fields respectively in the addresses generated by the processor?
Answer: (D)
A fully associative cache has no index field, because a block can be placed in any line.
The block size is 16 bytes so the offset is 4 bits. The tag is 32 4 = 28 bits.
Answer: 28 bits and 0 bits
The block size is 16 bytes so the offset is 4 bits. The tag is 32 4 = 28 bits.
Answer: 28 bits and 0 bits
The chip select logic for a certain DRAM chip in a memory system design is shown below. Assume that the memory system has 16 address lines denoted by . What is the range of address (in hexadecimal) of the memory system that can get enabled by the chip select (CS) signal?
Answer: (A)
CS becomes 1 only when . Here A13 and A12 come in through inverting bubbles. The lines A10 to A0 can take any value.
- Lowest address: 1100 1000 0000 0000 = C800
- Highest address: 1100 1111 1111 1111 = CFFF
Answer: C800 to CFFF
- Lowest address: 1100 1000 0000 0000 = C800
- Highest address: 1100 1111 1111 1111 = CFFF
Answer: C800 to CFFF
Which one of the following kinds of derivation is used by LR parsers?
Answer: (D)
An LR parser is a bottom-up parser. It keeps reducing handles again and again. The order of these reductions is a rightmost derivation followed backwards.
Answer: Rightmost in reverse
Answer: Rightmost in reverse
In 16-bit 2's complement representation, the decimal number -28 is:
Answer: (C)
Write +28 in 16 bits: 0000 0000 0001 1100.
Now find the 2's complement. Invert all bits 1111 1111 1110 0011, then add 1 1111 1111 1110 0100.
Answer: 1111 1111 1110 0100
Now find the 2's complement. Invert all bits 1111 1111 1110 0011, then add 1 1111 1111 1110 0100.
Answer: 1111 1111 1110 0100
Let . Let . Consider the following two statements on |A|.
I.
II.
Which of the above statements is/are TRUE?
I.
II.
Which of the above statements is/are TRUE?
Answer: (C)
is the set of pairs with . Count them in two ways.
- Choose first: there are choices. The set must contain , and each of the other elements can be in or not, so there are such sets. So , and statement I is true.
- Choose the size of first (, since must contain ): there are sets of that size, and each gives choices for . So , and statement II is true.
Both counts give the same , so both statements are true.
Answer: (C)
- Choose first: there are choices. The set must contain , and each of the other elements can be in or not, so there are such sets. So , and statement I is true.
- Choose the size of first (, since must contain ): there are sets of that size, and each gives choices for . So , and statement II is true.
Both counts give the same , so both statements are true.
Answer: (C)