Chapter 5: Number System and Digital Logic (Set-1)
In a positional number system, the base (radix) mainly decides
A Digit symbols used
B Number of bits
C Place value weights
D Decimal point position
Explanation: In positional notation, each position has a weight based on powers of the base. Changing the base changes those weights, which changes how digits represent the total value.
Which number system is base-2 and uses only 0 and 1
A Decimal system
B Binary system
C Octal system
D Hex system
Explanation: Binary is a base-2 number system. It uses only two symbols—0 and 1—called bits, and is the foundation of digital circuits and computer data representation.
Which number system is base-8
A Octal
B Binary
C Decimal
D Hexadecimal
Explanation: Octal uses base-8 and digits 0 to 7. It is often used as a compact way to represent binary numbers because each octal digit equals three binary bits.
Which number system uses digits 0–9 and base-10
A Binary
B Octal
C Decimal
D Hexadecimal
Explanation: Decimal is the everyday base-10 system. Each position represents a power of 10, and digits range from 0 to 9, making it intuitive for human calculations.
Hexadecimal number system uses base
A 2
B 8
C 10
D 16
Explanation: Hexadecimal is base-16. It uses digits 0–9 and letters A–F to represent values 10–15, giving a compact form for binary, where one hex digit equals four bits.
Which prefix commonly indicates a binary literal
A 0b
B 0d
C 0x
D 0o
Explanation: Many programming languages use prefixes to show number bases. “0b” indicates binary, “0x” indicates hexadecimal, and “0o” indicates octal, helping avoid confusion in code.
Which prefix commonly indicates a hexadecimal literal
A 0b
B 0d
C 0x
D 0h
Explanation: “0x” is a widely used prefix for hexadecimal numbers in programming. It clearly signals base-16, where digits include 0–9 and A–F for compact representation of binary values.
In binary, a single digit is called a
A Nibble
B Bit
C Byte
D Word
Explanation: A binary digit is a bit. It can be 0 or 1. Bits are the smallest unit of data in digital systems, and larger units like bytes are groups of bits.
A group of 4 bits is commonly called
A Nibble
B Byte
C Word
D Parity
Explanation: A nibble equals 4 bits. It matches well with hexadecimal, because one hex digit represents exactly 4 bits, making nibble-level grouping useful in digital logic and memory displays.
A byte contains how many bits
A 4
B 16
C 8
D 32
Explanation: A byte is 8 bits. It is a standard unit for storing characters and small values in computers. Many memory sizes and file sizes are measured in bytes and multiples of bytes.
In octal, each digit corresponds to how many bits
A 2
B 4
C 8
D 3
Explanation: Octal digits represent values 0–7, which need exactly 3 bits. Therefore, converting between binary and octal is easy by grouping binary digits in sets of three.
In hexadecimal, each digit corresponds to how many bits
A 4
B 2
C 3
D 8
Explanation: Hex digits range from 0 to 15, which fits into 4 bits (0000 to 1111). So binary-to-hex conversion is done by grouping bits into sets of four.
Convert binary 1010 to decimal
A 8
B 9
C 10
D 12
Explanation: Binary 1010 equals (1×8) + (0×4) + (1×2) + (0×1) = 8 + 2 = 10. Place values in binary are powers of 2.
Convert decimal 13 to binary
A 1100
B 1101
C 1011
D 1110
Explanation: 13 in decimal is 8 + 4 + 1. So the bits for 8, 4, 2, 1 are 1,1,0,1 giving 1101 in binary.
Convert binary 1111 to decimal
A 12
B 13
C 15
D 14
Explanation: 1111₂ equals 8 + 4 + 2 + 1 = 15. All four lower place values are set to 1, producing the maximum value for a 4-bit unsigned number.
Convert hex A to decimal
A 10
B 9
C 11
D 12
Explanation: In hexadecimal, A represents decimal 10, then B=11, C=12, D=13, E=14, F=15. This allows compact writing of large binary values.
Convert decimal 255 to hexadecimal
A FE
B 1F
C F0
D FF
Explanation: 255 decimal equals 16×15 + 15, so it becomes FF in hex. This is also 11111111 in binary, the maximum value of an 8-bit unsigned number.
Convert binary 11001100 to hexadecimal
A C3
B 33
C CC
D AA
Explanation: Group 11001100 into 4-bit parts: 1100 and 1100. Each 1100₂ is C in hex. So the result is CC, a compact representation of that binary byte.
Convert octal 17 to decimal
A 15
B 13
C 14
D 16
Explanation: Octal 17 means (1×8) + 7 = 8 + 7 = 15 decimal. Octal digits have place values in powers of 8, similar to binary and decimal systems.
Binary addition: 1 + 1 equals
A 0 carry 0
B 0 carry 1
C 1 carry 0
D 1 carry 1
Explanation: In binary, 1 + 1 = 10₂. The sum bit is 0 and a carry of 1 goes to the next higher bit position, just like carrying in decimal addition.
Binary addition: 101 + 011 equals
A 100
B 110
C 1000
D 111
Explanation: 101₂ is 5 and 011₂ is 3. Their sum is 8, which is 1000₂, but wait: 5+3=8; correct binary is 1000. So choose 1000₂.
Unsigned 4-bit range is
A 0 to 15
B 0 to 7
C -8 to 7
D -7 to 8
Explanation: With 4 bits unsigned, minimum is 0000₂ = 0 and maximum is 1111₂ = 15. Unsigned representation uses all bits for magnitude, no sign bit.
In signed 2’s complement, MSB mainly indicates
A Carry bit
B Parity bit
C Checksum
D Sign bit
Explanation: In 2’s complement signed numbers, the most significant bit acts as the sign indicator: 0 means non-negative, 1 means negative. The remaining bits represent the magnitude in complement form.
1’s complement of binary 0101 is
A 0101
B 0110
C 1010
D 1001
Explanation: 1’s complement flips every bit: 0 becomes 1 and 1 becomes 0. So 0101 becomes 1010. It is one method for representing negative values in binary systems.
2’s complement of binary 0101 is
A 1010
B 1011
C 1100
D 0110
Explanation: To find 2’s complement, first take 1’s complement (0101 → 1010), then add 1: 1010 + 1 = 1011. This representation is widely used for signed arithmetic.
In 8-bit 2’s complement, range is
A -128 to 127
B -127 to 127
C -255 to 255
D 0 to 255
Explanation: In n-bit 2’s complement, range is −2^(n−1) to 2^(n−1)−1. For 8 bits, that becomes −128 to +127, covering 256 total patterns.
In 1’s complement, how many zero forms exist
A One
B Three
C Two
D Four
Explanation: 1’s complement has +0 (all zeros) and −0 (all ones). This “two zero” issue is one reason 2’s complement is preferred, because it has only one representation for zero.
Sign extension is mainly used when
A Printing numbers
B Increasing bit-width
C Deleting MSB
D Making ASCII
Explanation: Sign extension preserves the signed value when increasing the number of bits. In 2’s complement, the sign bit is repeated into new higher bits, keeping the same numeric value after widening.
Overflow in signed addition usually means
A Any carry occurs
B Carry into MSB
C Result out of range
D Bits become zero
Explanation: Signed overflow happens when the true result cannot fit in the fixed number of bits. For 2’s complement, adding two same-sign numbers giving opposite-sign result indicates overflow.
Which gate outputs 1 only when all inputs are 1
A AND gate
B OR gate
C XOR gate
D NAND gate
Explanation: AND gives 1 only if every input is 1. If any input is 0, output becomes 0. AND is used for enabling conditions and masking operations in digital circuits.
Which gate outputs 1 when any input is 1
A AND gate
B XNOR gate
C NOT gate
D OR gate
Explanation: OR produces 1 when at least one input is 1. It only outputs 0 when all inputs are 0. OR is used for combining conditions in logic circuits.
Which gate inverts the input signal
A AND
B OR
C NOT
D XOR
Explanation: NOT gate outputs the complement of the input: 0 becomes 1, and 1 becomes 0. It is also called an inverter and is essential for building more complex logic.
Output of NAND gate equals
A NOT(AND)
B NOT(OR)
C AND(OR)
D OR(NOT)
Explanation: NAND is the negation of AND. It outputs 0 only when all inputs are 1; otherwise output is 1. NAND is a universal gate used to build any logic function.
Output of NOR gate equals
A NOT(AND)
B XOR(AND)
C NOT(OR)
D XNOR(OR)
Explanation: NOR is the negation of OR. It outputs 1 only when all inputs are 0. Like NAND, NOR is also a universal gate capable of implementing any Boolean function.
XOR gate outputs 1 when inputs are
A Different
B Both same
C Both zero
D Both one
Explanation: XOR (exclusive OR) outputs 1 when inputs differ. For two inputs, it is 1 for 01 or 10. XOR is used in parity generation and addition circuits.
XNOR gate outputs 1 when inputs are
A Different
B All one
C All zero
D Same
Explanation: XNOR is the complement of XOR. It outputs 1 when inputs match (00 or 11). It is useful for equality checking in digital comparators.
A truth table shows
A Circuit size
B Voltage levels only
C All input-output cases
D Memory locations
Explanation: A truth table lists every possible input combination and the corresponding output. It is a standard method to describe and verify logic gates and Boolean expressions systematically.
Which are called universal gates
A AND, OR
B NAND, NOR
C XOR, XNOR
D NOT, OR
Explanation: NAND and NOR are universal gates because any Boolean function can be implemented using only NAND gates or only NOR gates. This simplifies hardware design and manufacturing.
De Morgan’s law example is
A (A+B)=A·B
B A+A=A’
C (A·B)’=A’+B’
D A·0=A
Explanation: De Morgan’s laws show how complements distribute over AND/OR. One form is (A·B)’ = A’ + B’. These laws help simplify logic expressions and gate-level designs.
Boolean variable values are typically
A 0 and 1
B 0 to 9
C A to F
D Any integer
Explanation: Boolean algebra uses two values: 0 (false) and 1 (true). Logic circuits map these to low/high voltage levels. Boolean operations combine these values using AND, OR, and NOT.
Identity law for OR is
A A+1=A
B A+0=A
C A·0=A
D A·1=0
Explanation: The identity element for OR is 0. OR-ing any Boolean variable with 0 leaves it unchanged. This rule is used frequently in simplifying Boolean expressions and digital logic.
Identity law for AND is
A A·0=A
B A+0=0
C A·1=A
D A+1=0
Explanation: The identity element for AND is 1. AND-ing any Boolean variable with 1 leaves it unchanged. It helps reduce expressions when a term is multiplied by 1.
Null law for OR is
A A+0=0
B A·0=1
C A·1=0
D A+1=1
Explanation: In Boolean algebra, OR with 1 always gives 1 because true OR anything is true. This is called the null law for OR and is used for quick simplification.
Null law for AND is
A A·0=0
B A·1=0
C A+0=1
D A+1=A
Explanation: AND with 0 always gives 0 because false AND anything is false. This null law is important in masking operations where multiplying by 0 clears the output.
Idempotent law states
A A+A=A’
B A·A=A’
C A+A=A
D A·A=0
Explanation: Idempotent law says repeating the same variable with OR or AND doesn’t change it: A + A = A and A·A = A. It reduces duplicate terms in expressions.
Complement law for OR is
A A+A’=1
B A+A’=0
C A·A’=1
D A·A=0
Explanation: A variable OR its complement is always 1. If A is 0, A’ is 1; if A is 1, A’ is 0. In both cases, OR results in 1.
Complement law for AND is
A A·A’=1
B A·A’=0
C A+A’=0
D A+A=1
Explanation: A variable AND its complement is always 0. They can never be 1 at the same time, so the AND output must be 0. This is a key rule in simplification.
Absorption law example is
A A+B=AB
B A·(A+B)=B
C A+AB=A
D (A’)’=0
Explanation: Absorption law removes redundant terms: A + A·B simplifies to A because if A is 1, the sum is already 1; if A is 0, both terms are 0.
BCD code represents
A Binary real numbers
B ASCII characters
C Hex digits only
D Decimal digits binary
Explanation: BCD (Binary Coded Decimal) encodes each decimal digit (0–9) using a 4-bit binary pattern. It is used in displays and some decimal-based computations where digit accuracy matters.
A parity bit is mainly used for
A Error detection
B Speed increase
C Data compression
D Address decoding
Explanation: A parity bit adds redundancy so simple transmission or storage errors can be detected. Even parity makes total 1s even; odd parity makes total 1s odd, enabling basic single-bit error detection.