SemSure
←Computer Organization & Architecture · Unit 1Number systems, representations and codes✓ 0/41/121
① Topic

Number systems, representations and codes

Definition
A positional numeral uses powers of its base. A code such as BCD instead assigns a fixed bit pattern to each source digit.

Opens chatgpt.com in a new tab with a ready-made prompt for this topic.

① Topic

Understand architecture and organization

Architecture describes the interface visible to software, including instructions and data types. Organization describes how buses, circuits and control implement that interface.

① Topic

Read place values

The units position has weight one. Powers increase to the left and become negative to the right of the radix point. Multiplying digit values by these weights recovers the numeral’s value.

① Topic

Convert by division and multiplication

Repeated division gives low integer digits first. For a fraction, multiply by the destination radix, emit the integer part, and carry the remainder forward.

① Topic

Group bits without decimal arithmetic

Octal digits correspond to groups of three bits; hexadecimal digits correspond to groups of four. Start at the radix point and pad only on outside edges.

① Topic

Recognize repeating fractions

A reduced rational fraction terminates in a destination base only if its denominator divides a power of that base. Repeating remainders produce recurring digits.

① Topic

Distinguish signed encodings

Sign-magnitude uses a separate sign and ordinary magnitude. One’s complement flips a positive bit pattern. Two’s complement flips and adds one, giving a unique zero.

① Topic

Choose width before negation

A signed n-bit two’s complement word covers −2^(n−1) through 2^(n−1)−1. Sign extension copies the sign rather than prepending zero to a negative value.

① Topic

Subtract by complementing

Keep the word width fixed. One’s complement uses end-around carry, while two’s complement discards the carry outside the selected width.

① Topic

Distinguish overflow from carry

Carry-out is relevant to unsigned addition. Signed overflow means the exact result is beyond the signed range. It can occur with or without an outgoing carry.

② Question

Compute and verify four signed operations

8Asked in: May2023 Q21a

The binary numbers listed have a sign in the leftmost position and if negative are in 2’s complement form. Perform the arithmetic operations indicated and verify the answers. (i) 101011 + 111000 (ii) 001110 + 110010 (iii) 111001 − 001010 (iv) 101011 − 100110.

Exam tip May2023 Q21a. Use the specified signed six-bit two’s-complement interpretation.
③ Learn · step 1 of 6

Set the word width and interpretation

The question explicitly uses two’s-complement inputs. Keep the given width and distinguish carry from signed overflow.

③ Learn · step 2 of 6

101011 + 111000

Add 101011 and 111000. The raw low word is 100011 and carry-out is 1. The final word is 100011.

1 of 3
③ Learn · step 3 of 6

001110 + 110010

Add 001110 and 110010. The raw low word is 000000 and carry-out is 1. The final word is 000000.

1 of 3
③ Learn · step 4 of 6

111001 − 001010 using 2’s complement

Add 111001 and 110110. The raw low word is 101111 and carry-out is 1. The final word is 101111.

1 of 3
③ Learn · step 5 of 6

101011 − 100110 using 2’s complement

Add 101011 and 011010. The raw low word is 000101 and carry-out is 1. The final word is 000101.

1 of 3
③ Learn · step 6 of 6

Verify the answers

Interpret the inputs in their stated representation and compare ordinary arithmetic to the result word. Check the carry rule independently of the sign bit.

④ Exam answer

Booklet answer · Compute and verify four signed operations

101011 + 111000

Add 101011 and 111000. The raw low word is 100011 and carry-out is 1. The final word is 100011. Direct signed arithmetic gives -29. It fits and matches the sign-extended result.

BitAOperandCarry inResult bitCarry out
010010
110010
200000
311001
401101
511111

001110 + 110010

Add 001110 and 110010. The raw low word is 000000 and carry-out is 1. The final word is 000000. Direct signed arithmetic gives 0. It fits and matches the sign-extended result.

BitAOperandCarry inResult bitCarry out
000000
111001
210101
310101
401101
501101

111001 − 001010 using 2’s complement

Add 111001 and 110110. The raw low word is 101111 and carry-out is 1. The final word is 101111. Direct signed arithmetic gives -17. It fits and matches the sign-extended result.

BitAOperandCarry inResult bitCarry out
010010
101010
201010
310010
411001
511111

101011 − 100110 using 2’s complement

Add 101011 and 011010. The raw low word is 000101 and carry-out is 1. The final word is 000101. Direct signed arithmetic gives 5. It fits and matches the sign-extended result.

BitAOperandCarry inResult bitCarry out
010010
111001
200110
311001
401101
510101
② Question

Compare decimal, binary, octal and hexadecimal

8Asked in: May2024 Q21a

Differentiate between decimal, binary, octal and hexadecimal.

③ Learn · step 1 of 4

Read the radix

The radix fixes the number of digit symbols and the place weights.

③ Learn · step 2 of 4

Relate bases to bit groups

A binary digit is one bit, an octal digit is three and a hex digit is four. Decimal digit grouping instead requires a code if used in binary hardware.

③ Learn · step 3 of 4

Work one example in four bases

42 in base 10, 101010 in base 2, 52 in base 8, 2A in base 16

③ Learn · step 4 of 4

Verify the equivalence

Expand each representation as digit times place weight. The sums must represent the same value.

④ Exam answer

Booklet answer · Compare decimal, binary, octal and hexadecimal

Decimal has radix ten and uses digits 0–9. Binary has radix two and uses digits 0 and 1, matching two-state digital circuits. Octal has radix eight and uses digits 0–7, so each digit corresponds to three bits. Hexadecimal has radix sixteen and uses digits 0–9 and A–F, so each hex digit corresponds to four bits.

For example, 42 (base 10) = 101010 (base 2) = 52 (base 8) = 2A (base 16). Decimal is convenient for people, while octal and hexadecimal provide compact representations of binary words.

② Question

Subtract using one’s and two’s complement

8Asked in: May2024 Q21b

(i) Subtract 111001₂ from 101011₂ using the 1’s complement method. (ii) Subtract 101011₂ from 111001₂ using the 2’s complement method.

Exam tip May2024 Q21b. Treat the unmarked bit strings as unsigned magnitudes for both complement methods.
③ Learn · step 1 of 4

Set the word width and interpretation

Align the radix points, and left-pad unequal unsigned operands before complementing a subtrahend.

③ Learn · step 2 of 4

101011 − 111001 using 1’s complement

Add 101011 and 000110. The raw low word is 110001 and carry-out is 0. The final word is 110001.

1 of 3
③ Learn · step 3 of 4

111001 − 101011 using 2’s complement

Add 111001 and 010101. The raw low word is 001110 and carry-out is 1. The final word is 001110.

1 of 3
③ Learn · step 4 of 4

Verify the answers

Interpret the inputs in their stated representation and compare ordinary arithmetic to the result word. Check the carry rule independently of the sign bit.

④ Exam answer

Booklet answer · Subtract using one’s and two’s complement

101011 − 111001 using 1’s complement

Add 101011 and 000110. The raw low word is 110001 and carry-out is 0. The final word is 110001. The difference or sum checked as ordinary magnitudes is -14. With no end carry, complement the negative result word to recover the magnitude.

BitAOperandCarry inResult bitCarry out
010010
111001
201101
310101
400110
510010

111001 − 101011 using 2’s complement

Add 111001 and 010101. The raw low word is 001110 and carry-out is 1. The final word is 001110. The difference or sum checked as ordinary magnitudes is 14.

BitAOperandCarry inResult bitCarry out
011001
100110
201010
310010
411001
510101
② Question

Add two unsigned words and convert the sum

8Asked in: Nov2024 Q21b

Given the binary numbers 101101 and 110110, perform the following tasks. 1. Add the binary numbers and provide the result. 2. Convert the binary result to its decimal equivalent. 3. Convert the decimal result to Octal and Hexadecimal.

Exam tip Nov2024 Q21b. Use unsigned operands because no signed convention is given.
③ Learn · step 1 of 6

0101101 + 0110110

Add 0101101 and 0110110. The raw low word is 1100011 and carry-out is 0. The final word is 1100011.

1 of 3
③ Learn · step 2 of 6

Separate the integer and fractional parts

Use the original radix to interpret the input. For power-of-two bases, grouping bits outwards from the radix point gives the same result.

③ Learn · step 3 of 6

Convert 1100011 to base 10

The source numeral denotes 99 in decimal. Read integer remainders upwards and fractional digits downwards.

1 of 3
③ Learn · step 4 of 6

Convert 99 to base 8

The source numeral denotes 99 in decimal. Read integer remainders upwards and fractional digits downwards.

1 of 3
③ Learn · step 5 of 6

Convert 99 to base 16

The source numeral denotes 99 in decimal. Read integer remainders upwards and fractional digits downwards.

1 of 3
③ Learn · step 6 of 6

Check termination and BCD

Read divisions in reverse order and multiplications in forward order. An ellipsis denotes truncation, and parentheses identify a complete detected repeat.

④ Exam answer

Booklet answer · Add two unsigned words and convert the sum

Retain the carry because no fixed-width truncation is requested. Add 0101101 and 0110110. The raw low word is 1100011 and carry-out is 0. The final word is 1100011.

BitAOperandCarry inResult bitCarry out
010010
101010
211001
310101
401101
511111
600110

1100011 (base 2) → 99 (base 10)

The quotient/remainder working for the integer part is shown below.

DividendQuotient ÷ 10Remainder digit
9999
909

99 (base 10) → 143 (base 8)

The quotient/remainder working for the integer part is shown below.

DividendQuotient ÷ 8Remainder digit
99123
1214
101

99 (base 10) → 63 (base 16)

The quotient/remainder working for the integer part is shown below.

DividendQuotient ÷ 16Remainder digit
9963
606
② Question

Convert 105.15 to binary, octal, hex and BCD

8Asked in: Jun2025 Q21a

Convert the Decimal number 105.15 into Binary, Octal, Hexadecimal and BCD forms.

Exam tip Jun2025 Q21a. The nondecimal fractions repeat. Show recurring digits rather than assert truncation is exact.
③ Learn · step 1 of 5

Separate the integer and fractional parts

Use the original radix to interpret the input. For power-of-two bases, grouping bits outwards from the radix point gives the same result.

③ Learn · step 2 of 5

Convert 105.15 to base 2

The source numeral denotes 105.15 in decimal. Read integer remainders upwards and fractional digits downwards.

1 of 4
③ Learn · step 3 of 5

Convert 105.15 to base 8

The source numeral denotes 105.15 in decimal. Read integer remainders upwards and fractional digits downwards.

1 of 4
③ Learn · step 4 of 5

Convert 105.15 to base 16

The source numeral denotes 105.15 in decimal. Read integer remainders upwards and fractional digits downwards.

1 of 4
③ Learn · step 5 of 5

Check termination and BCD

8421 BCD encodes each decimal digit separately: 0001 0000 0101 . 0001 0101. Repeated fractional remainders produce repeating positional digits.

④ Exam answer

Booklet answer · Convert 105.15 to binary, octal, hex and BCD

105.15 (base 10) → 1101001.00(1001) repeating (base 2)

The quotient/remainder working for the integer part is shown below. Multiply the fractional remainder repeatedly and record the integer digit each time.

DividendQuotient ÷ 2Remainder digit
105521
52260
26130
1361
630
311
101
Fraction numerator over 100Numerator × 2Output digitNext numerator
1530030
3060060
60120120
2040040
4080080
80160160

105.15 (base 10) → 151.1(1463) repeating (base 8)

The quotient/remainder working for the integer part is shown below. Multiply the fractional remainder repeatedly and record the integer digit each time.

DividendQuotient ÷ 8Remainder digit
105131
1315
101
Fraction numerator over 100Numerator × 8Output digitNext numerator
15120120
20160160
60480480
80640640
40320320

105.15 (base 10) → 69.2(6) repeating (base 16)

The quotient/remainder working for the integer part is shown below. Multiply the fractional remainder repeatedly and record the integer digit each time.

DividendQuotient ÷ 16Remainder digit
10569
606
Fraction numerator over 100Numerator × 16Output digitNext numerator
15240240
40640640

In 8421 BCD, encode the decimal digits separately as 0001 0000 0101 . 0001 0101.

② Question

Convert two fractional numerals to octal

8Asked in: Nov2025 Q21a

Convert the following numbers (i) (163.789)₁₀ to Octal number (4 Marks) (ii) (11001101.0101)₂ to base8 (4 Marks).

Exam tip Nov2025 Q21a. The fractional octal expansion continues beyond the 12 displayed digits.
③ Learn · step 1 of 4

Separate the integer and fractional parts

Use the original radix to interpret the input. For power-of-two bases, grouping bits outwards from the radix point gives the same result.

③ Learn · step 2 of 4

Convert 163.789 to base 8

The source numeral denotes 163.789 in decimal. Read integer remainders upwards and fractional digits downwards.

1 of 4
③ Learn · step 3 of 4

Convert 11001101.0101 to base 8

The source numeral denotes 205.3125 in decimal. Read integer remainders upwards and fractional digits downwards.

1 of 4
③ Learn · step 4 of 4

Check termination and BCD

Read divisions in reverse order and multiplications in forward order. An ellipsis denotes truncation, and parentheses identify a complete detected repeat.

④ Exam answer

Booklet answer · Convert two fractional numerals to octal

163.789 (base 10) → 243.623757473310… (base 8)

The quotient/remainder working for the integer part is shown below. Multiply the fractional remainder repeatedly and record the integer digit each time.

DividendQuotient ÷ 8Remainder digit
163203
2024
202
Fraction numerator over 1000Numerator × 8Output digitNext numerator
78963126312
31224962496
49639683968
96877447744
74459525952
95276167616
61649284928
92874247424
42433923392
39231363136
1361088188
887040704

11001101.0101 (base 2) → 315.24 (base 8)

The quotient/remainder working for the integer part is shown below. Multiply the fractional remainder repeatedly and record the integer digit each time.

DividendQuotient ÷ 8Remainder digit
205255
2531
303
Fraction numerator over 16Numerator × 8Output digitNext numerator
54028
86440
② Question

Convert a decimal integer and a hex fraction

8Asked in: Nov2025 Q21b

Convert the following numbers (i) (4567)₁₀ to base2 (4 Marks) (ii) (4D.56)₁₆ to Binary (4 Marks).

③ Learn · step 1 of 4

Separate the integer and fractional parts

Use the original radix to interpret the input. For power-of-two bases, grouping bits outwards from the radix point gives the same result.

③ Learn · step 2 of 4

Convert 4567 to base 2

The source numeral denotes 4567 in decimal. Read integer remainders upwards and fractional digits downwards.

1 of 3
③ Learn · step 3 of 4

Convert 4D.56 to base 2

The source numeral denotes 77.3359375 in decimal. Read integer remainders upwards and fractional digits downwards.

1 of 4
③ Learn · step 4 of 4

Check termination and BCD

Read divisions in reverse order and multiplications in forward order. An ellipsis denotes truncation, and parentheses identify a complete detected repeat.

④ Exam answer

Booklet answer · Convert a decimal integer and a hex fraction

4567 (base 10) → 1000111010111 (base 2)

The quotient/remainder working for the integer part is shown below.

DividendQuotient ÷ 2Remainder digit
456722831
228311411
11415701
5702850
2851421
142710
71351
35171
1781
840
420
210
101

4D.56 (base 16) → 1001101.0101011 (base 2)

The quotient/remainder working for the integer part is shown below. Multiply the fractional remainder repeatedly and record the integer digit each time.

DividendQuotient ÷ 2Remainder digit
77381
38190
1991
941
420
210
101
Fraction numerator over 256Numerator × 2Output digitNext numerator
861720172
172344188
881760176
176352196
961920192
1923841128
12825610
② Question

Work fixed-point addition and two complement cases

16Asked in: Dec2018-IT0205 Q13b

(i) Add the following numbers 232.25+136.75 using binary addition. (6 Marks) (ii) Subtract 16 from 5 using 2’s complement. (5 Marks) (iii) Perform the following using 1’s complement −12+7. (5 Marks).

③ Learn · step 1 of 5

Align the binary points

The addends become 11101000.01 and 10001000.11. The fractional sum produces a carry into the units column.

③ Learn · step 2 of 5

Add fixed-point columns, with two fractional bits

The table is empty. Press Next step to fill it one row at a time (11 steps).

BitAOperandCarry inResult bitCarry out
③ Learn · step 3 of 5

000101 − 010000 using 2’s complement

Add 000101 and 110000. The raw low word is 110101 and carry-out is 0. The final word is 110101.

1 of 3
③ Learn · step 4 of 5

10011 + 00111

Add 10011 and 00111. The raw low word is 11010 and carry-out is 0. The final word is 11010.

1 of 3
③ Learn · step 5 of 5

Check all values in decimal

The binary fixed-point sum is 101110001. The signed subtraction is −11, and −12 plus 7 is −5.

④ Exam answer

Booklet answer · Work fixed-point addition and two complement cases

Align two binary fraction bits. Add 11101000.01 and 10001000.11 to obtain 101110001. The two fractional digits together generate an integer carry.

Represent 5 and 16 in six bits. Add the two’s complement of 16 to 5 and keep the low six bits, obtaining 110101 for −11.

For −12 + 7 use five-bit one’s complement. The code of −12 is 10011. Add 7 and check any end-around carry. The result is 11010, which is the complement of +5.

① Topic

BCD, Gray, Excess-3 and parity

Definition
A code maps input symbols to bit patterns for a particular purpose. Decimal, transition and error-detection codes use different rules.

Opens chatgpt.com in a new tab with a ready-made prompt for this topic.

① Topic

Separate digits from a bit string

BCD encodes each decimal digit using four bits. Excess-3 adds three to each digit before encoding. Neither uses one positional binary integer for the whole decimal numeral.

① Topic

Carry in BCD

A four-bit word can hold values above nine. Add six to any raw BCD digit sum above nine to discard the six invalid codes and produce a decimal carry.

① Topic

Generate Gray code and parity

Keep the leading binary bit and XOR each following bit with the previous binary bit for Gray conversion. A parity bit makes the total count of ones even or odd as specified.

② Question

BCD addition of 984 and 599 and complement subtraction

8Asked in: Nov2023 Q21a

(i) Perform BCD Addition for 984+599. (4 marks) (ii) Perform (111100) − (1011) using 1’s and 2’s complement method. (4 marks)

Exam tip Nov2023 Q21a. Zero-extend 1011 to six bits and treat the operands as unsigned magnitudes for complement subtraction.
③ Learn · step 1 of 5

Represent the decimal digits separately

984 is 1001 1000 0100; 599 is 0101 1001 1001. Add from units towards the most significant digit.

③ Learn · step 2 of 5

Correct any raw digit greater than nine

The table is empty. Press Next step to fill it one row at a time (4 steps).

Place from rightA digitB digitCarry inRaw binaryCorrectionBCD digitCarry out
③ Learn · step 3 of 5

111100 − 1011 using 1’s complement

Add 111100 and 110100. The raw low word is 110000 and carry-out is 1. Add the carry back at the low end. The final word is 110001.

1 of 3
③ Learn · step 4 of 5

111100 − 1011 using 2’s complement

Add 111100 and 110101. The raw low word is 110001 and carry-out is 1. The final word is 110001.

1 of 3
③ Learn · step 5 of 5

Check the BCD digits

Every corrected group encodes a decimal digit. Read from the most significant group to obtain 0001 0101 1000 0011 = 1583.

④ Exam answer

Booklet answer · BCD addition of 984 and 599 and complement subtraction

In the digit sums, add binary 0110 whenever the raw digit total is above nine, and propagate the corrected carry to the next position.

Place from rightA digitB digitCarry inRaw binaryCorrectionBCD digitCarry out
049001101600111
189110010610001
295101111601011
300100001000010

The decimal result 1583 has BCD representation 0001 0101 1000 0011.

111100 − 1011 using 1’s complement

Add 111100 and 110100. The raw low word is 110000 and carry-out is 1. Add the carry back at the low end. The final word is 110001. The difference or sum checked as ordinary magnitudes is 49.

BitAOperandCarry inResult bitCarry out
000000
100000
211001
310101
411111
511111

111100 − 1011 using 2’s complement

Add 111100 and 110101. The raw low word is 110001 and carry-out is 1. The final word is 110001. The difference or sum checked as ordinary magnitudes is 49.

BitAOperandCarry inResult bitCarry out
001010
100000
211001
310101
411111
511111
② Question

BCD addition of 175 and 326 and complement subtraction

8Asked in: Jul2025 Q21b

(i) Perform BCD Addition for 175 and 326. (4 marks) (ii) Perform (111100) − (001011) using 1’s and 2’s complement method. (4 marks)

Exam tip Jul2025 Q21b. Treat the operands as unsigned magnitudes for complement subtraction.
③ Learn · step 1 of 5

Represent the decimal digits separately

175 is 0001 0111 0101; 326 is 0011 0010 0110. Add from units towards the most significant digit.

③ Learn · step 2 of 5

Correct any raw digit greater than nine

The table is empty. Press Next step to fill it one row at a time (3 steps).

Place from rightA digitB digitCarry inRaw binaryCorrectionBCD digitCarry out
③ Learn · step 3 of 5

111100 − 001011 using 1’s complement

Add 111100 and 110100. The raw low word is 110000 and carry-out is 1. Add the carry back at the low end. The final word is 110001.

1 of 3
③ Learn · step 4 of 5

111100 − 001011 using 2’s complement

Add 111100 and 110101. The raw low word is 110001 and carry-out is 1. The final word is 110001.

1 of 3
③ Learn · step 5 of 5

Check the BCD digits

Every corrected group encodes a decimal digit. Read from the most significant group to obtain 0101 0000 0001 = 501.

④ Exam answer

Booklet answer · BCD addition of 175 and 326 and complement subtraction

In the digit sums, add binary 0110 whenever the raw digit total is above nine, and propagate the corrected carry to the next position.

Place from rightA digitB digitCarry inRaw binaryCorrectionBCD digitCarry out
056001011600011
172101010600001
213100101001010

The decimal result 501 has BCD representation 0101 0000 0001.

111100 − 001011 using 1’s complement

Add 111100 and 110100. The raw low word is 110000 and carry-out is 1. Add the carry back at the low end. The final word is 110001. The difference or sum checked as ordinary magnitudes is 49.

BitAOperandCarry inResult bitCarry out
000000
100000
211001
310101
411111
511111

111100 − 001011 using 2’s complement

Add 111100 and 110101. The raw low word is 110001 and carry-out is 1. The final word is 110001. The difference or sum checked as ordinary magnitudes is 49.

BitAOperandCarry inResult bitCarry out
001010
100000
211001
310101
411111
511111
② Question

BCD addition of 375 and 648

8Asked in: May2026 Q21a

Perform the operation (375 + 648)₁₀ using BCD addition step by step. (i) Write the final result in BCD form and also in Binary form. (ii) Convert the result into octal, Hexadecimal.

③ Learn · step 1 of 6

Represent the decimal digits separately

375 is 0011 0111 0101; 648 is 0110 0100 1000. Add from units towards the most significant digit.

③ Learn · step 2 of 6

Correct any raw digit greater than nine

The table is empty. Press Next step to fill it one row at a time (4 steps).

Place from rightA digitB digitCarry inRaw binaryCorrectionBCD digitCarry out
③ Learn · step 3 of 6

Convert 1023 to base 2

The source numeral denotes 1023 in decimal. Read integer remainders upwards and fractional digits downwards.

1 of 3
③ Learn · step 4 of 6

Convert 1023 to base 8

The source numeral denotes 1023 in decimal. Read integer remainders upwards and fractional digits downwards.

1 of 3
③ Learn · step 5 of 6

Convert 1023 to base 16

The source numeral denotes 1023 in decimal. Read integer remainders upwards and fractional digits downwards.

1 of 3
③ Learn · step 6 of 6

Check the BCD digits

Every corrected group encodes a decimal digit. Read from the most significant group to obtain 0001 0000 0010 0011 = 1023.

④ Exam answer

Booklet answer · BCD addition of 375 and 648

In the digit sums, add binary 0110 whenever the raw digit total is above nine, and propagate the corrected carry to the next position.

Place from rightA digitB digitCarry inRaw binaryCorrectionBCD digitCarry out
058001101600111
174101100600101
236101010600001
300100001000010

The decimal result 1023 has BCD representation 0001 0000 0010 0011.

1023 (base 10) → 1111111111 (base 2)

The quotient/remainder working for the integer part is shown below.

DividendQuotient ÷ 2Remainder digit
10235111
5112551
2551271
127631
63311
31151
1571
731
311
101

1023 (base 10) → 1777 (base 8)

The quotient/remainder working for the integer part is shown below.

DividendQuotient ÷ 8Remainder digit
10231277
127157
1517
101

1023 (base 10) → 3FF (base 16)

The quotient/remainder working for the integer part is shown below.

DividendQuotient ÷ 16Remainder digit
102363F
633F
303
① Topic

Boolean logic and gates

Definition
A Boolean gate maps binary inputs to a binary output. A truth table lists the result for every possible input combination.

Opens chatgpt.com in a new tab with a ready-made prompt for this topic.

① Topic

Draw gate shapes and bubbles

An inversion bubble changes the logical polarity at that pin. For NAND and NOR, inversion is on the output.

① Topic

Read the common gates

ABANDORNOTNANDNORXORXNORBUFFER
0000111010
0101110100
1001010101
1111000011
① Topic

Push a complement across a gate

De Morgan’s law changes an AND into OR or an OR into AND and complements each argument. This allows implementation in a single gate family.

① Topic

Map a product of sums

NOR each parenthesized sum, then NOR the results. The two levels restore the intended AND of sums.

① Topic

Use adjacency to simplify

A Karnaugh map uses Gray order so adjacent cells differ by one bit, including across edges. Group ones in powers of two and retain the variables constant within each group.

② Question

Draw logic symbols and derive their truth tables

8Asked in: May2023 Q21b, Jul2025 Q21a

Draw the graphic symbol, algebraic function and truth table for the following logic gates. (i) AND (ii) OR (iii) NAND (iv) EX-OR.

③ Learn · step 1 of 4

Identify the operators

Use the flat-backed symbol for AND, the curved symbol for OR, and a triangle for NOT or a buffer. XOR has a second curve at the input.

③ Learn · step 2 of 4

Associate the expressions and symbols

GateSymbolExpression
ANDA·B
ORA+B
NAND(A·B)′
XORA⊕B
③ Learn · step 3 of 4

Evaluate all input patterns

The table is empty. Press Next step to fill it one row at a time (4 steps).

ABANDORNANDXOR
③ Learn · step 4 of 4

Check the complements and input count

A bubble complements the result. A repeated column for NOT or BUFFER is intentional because that output depends on A alone.

④ Exam answer

Booklet answer · Draw logic symbols and derive their truth tables

The symbol, Boolean function and output for each possible input are as follows. Unary gates use A only. The output bubble denotes inversion.

GateSymbolExpression
ANDA·B
ORA+B
NAND(A·B)′
XORA⊕B
ABANDORNANDXOR
000010
010111
100111
111100

AND requires all inputs high, OR requires at least one high, and XOR responds to unequal inputs. NAND, NOR and XNOR invert their corresponding gate’s output.

② Question

Implement a NOR-only expression and binary-to-Gray logic

8Asked in: Nov2023 Q21b

(i) Implement F=(A′+B)(C+D′)E′ using only NOR Gates. (4 marks) (ii) Convert Binary “1010” into Gray code and also draw the logic diagram to implement the conversion. (4 marks)

③ Learn · step 1 of 4

Complement the literals with tied inputs

Tie each NOR input to A or D to obtain A′ or D′ respectively.

③ Learn · step 2 of 4

Construct the two-level network

A′ = NOR(A,A)     D′ = NOR(D,D)
N1 = NOR(A′,B)    N2 = NOR(C,D′)
F  = NOR(N1,N2,E)
③ Learn · step 3 of 4

Implement Gray conversion with XOR

G3 ← B3
G2 ← B3 XOR B2
G1 ← B2 XOR B1
G0 ← B1 XOR B0
③ Learn · step 4 of 4

Verify the selected input and output

The product of sums is the complement of the OR of its complemented factors. For the Gray converter, input 1010 gives 1111.

④ Exam answer

Booklet answer · Implement a NOR-only expression and binary-to-Gray logic

Use tied-input NORs to generate A′ and D′. Next form N1=(A′+B)′ and N2=(C+D′)′. The final three-input NOR gives (N1+N2+E)′, equal to (A′+B)(C+D′)E′ by De Morgan. A three-input OR stage for E can be synthesized using two-input NORs and an inverter if necessary.

The Gray converter copies B3 and XORs successive input bits. Thus 1010 gives 1111.

A′ = NOR(A,A)     D′ = NOR(D,D)
N1 = NOR(A′,B)    N2 = NOR(C,D′)
F  = NOR(N1,N2,E)
G3 ← B3
G2 ← B3 XOR B2
G1 ← B2 XOR B1
G0 ← B1 XOR B0
② Question

Build NOT, AND and OR from NAND and NOR

8Asked in: Nov2024 Q21a

Describe briefly about Universal Gates? Show how to implement the basic gates using Universal Gates.

8Asked in: May2026 Q21b

Illustrate briefly about Universal Gates? Show how to implement the basic gates using Universal Gates.

③ Learn · step 1 of 4

Define universality

NOT, AND and OR suffice to build any Boolean expression. Showing all three from a single gate type proves that type is universal.

③ Learn · step 2 of 4

Use NAND alone

NOT A = NAND(A,A)
AND = NAND(NAND(A,B), NAND(A,B))
OR  = NAND(NAND(A,A), NAND(B,B))
③ Learn · step 3 of 4

Use NOR alone

NOT A = NOR(A,A)
OR  = NOR(NOR(A,B), NOR(A,B))
AND = NOR(NOR(A,A), NOR(B,B))
③ Learn · step 4 of 4

Check using De Morgan

For the NAND OR circuit the final NAND complements A′B′, giving A+B. For the NOR AND circuit the final NOR complements A′+B′, giving AB.

④ Exam answer

Booklet answer · Build NOT, AND and OR from NAND and NOR

NAND is universal. Tie its inputs to invert A. NAND A with B and then invert that output to recover AND. Invert each input with tied NANDs and NAND the inverted inputs to obtain OR by De Morgan’s law.

NOR is also universal. Tie its inputs to invert A. NOR A with B and invert the output to form OR. Invert the separate inputs and NOR those two inverted signals to obtain AND. Since each gate alone realizes NOT, AND and OR, either can realize every Boolean function.

NOT A = NAND(A,A)
AND = NAND(NAND(A,B), NAND(A,B))
OR  = NAND(NAND(A,A), NAND(B,B))
NOT A = NOR(A,A)
OR  = NOR(NOR(A,B), NOR(A,B))
AND = NOR(NOR(A,A), NOR(B,B))
② Question

Draw logic symbols and derive their truth tables

8Asked in: Jun2025 Q21b

Describe all the logic gates with symbols and truth table.

Exam tip Jun2025 Q21b. Printed CO2. Mapped to Unit 1 by topic.
③ Learn · step 1 of 4

Identify the operators

Use the flat-backed symbol for AND, the curved symbol for OR, and a triangle for NOT or a buffer. XOR has a second curve at the input.

③ Learn · step 2 of 4

Associate the expressions and symbols

GateSymbolExpression
ANDA·B
ORA+B
NOTA′
NAND(A·B)′
NOR(A+B)′
XORA⊕B
XNOR(A⊕B)′
BUFFERA
③ Learn · step 3 of 4

Evaluate all input patterns

The table is empty. Press Next step to fill it one row at a time (4 steps).

ABANDORNOTNANDNORXORXNORBUFFER
③ Learn · step 4 of 4

Check the complements and input count

A bubble complements the result. A repeated column for NOT or BUFFER is intentional because that output depends on A alone.

④ Exam answer

Booklet answer · Draw logic symbols and derive their truth tables

The symbol, Boolean function and output for each possible input are as follows. Unary gates use A only. The output bubble denotes inversion.

GateSymbolExpression
ANDA·B
ORA+B
NOTA′
NAND(A·B)′
NOR(A+B)′
XORA⊕B
XNOR(A⊕B)′
BUFFERA
ABANDORNOTNANDNORXORXNORBUFFER
0000111010
0101110100
1001010101
1111000011

AND requires all inputs high, OR requires at least one high, and XOR responds to unequal inputs. NAND, NOR and XNOR invert their corresponding gate’s output.

Practice

Part A quick check

PaperQuestion and optionsAnswer and reason
Dec2022 Q6

In one’s complement system the negative values are obtained by complementing each bit of the corresponding _____ number.

A. Positive
B. Neutral
C. Negative
D. Negative and positive
A · Flipping the positive magnitude word gives its negative code.
Dec2022 Q7

In addition of singed numbers, add n-bits and ignore the _____ signal from MSB position.

A. Carry out
B. Carry in
C. Positive
D. Negative
A · Fixed-width two’s complement discards carry beyond the word.
Dec2022 Q8

The _____ representation of numbers occupies a large amount of memory

A. 1’s complement
B. 2’s complement
C. Signed numbers
D. Signed magnitude
Ambiguous · All four fixed-width encodings occupy the same number of bits at a given width.
Dec2022 Q9

The method which has two representations for ‘0’ is called _____.

A. Hashing
B. Binary pair coding
C. Bit pair coding
D. Signed magnitude
D · Positive zero and negative zero have distinct signed-magnitude encodings.
May2023 Q1

The binary equivalent of the decimal number 26.2 is _____.

A. 10010.1101
B. 11010.0011
C. 11110.1110
D. 01110.0011
B approximate · 26 is 11010₂ and 0.2 repeatedly generates the digits 0011.
May2023 Q2

Find the hexadecimal value for the decimal number 264

A. 128
B. 108
C. 2A1
D. 761
B · 264 = 1×256 + 0×16 + 8.
May2023 Q3

The 2’s complement of the binary number 101101 is _____.

A. 011010
B. 100010
C. 001010
D. 010011
D · Invert to 010010 and add one.
May2023 Q4

Signed 2’s complement of −16 in 8-bit representation is _____.

A. 10111011
B. 10001100
C. 01110000
D. 00110101
None · The eight-bit word is 11110000.
Nov2023 Q1

Decimal 43 in Hexadecimal and BCD number system is respectively

A. B2, 0100 0011
B. 2B, 0100 0011
C. B2, 0011 0100
D. 2B, 0100 0011
B or D · 43 is 2B in hex and its two decimal digits encode as 0100 and 0011.
Nov2023 Q2

The 2’s complement representation of −17 is

A. 01110
B. 11110
C. 01111
D. 10001
None · −17 needs six signed bits and encodes as 101111.
Nov2023 Q3

The Excess-3 code of 23 is

A. 0101 0011
B. 0010 0000
C. 0010 0110
D. 0101 0110
D · Add three to each decimal digit before encoding it.
Nov2023 Q4

The equivalent gate is [A and B feed a NOR; its output feeds both inputs of a second NOR; a final inverter produces Y].

A. NOR
B. AND
C. NAND
D. OR
A · The tied NOR and final inverter are two inversions, leaving A NOR B.
May2024 Q1

The representation of hexadecimal number (6DE)H is decimal is _____.

A. 6×16²+13×16¹+14×16⁰
B. 6×16²+12×16¹+13×16⁰
C. 6×16²+11×16¹+14×16⁰
D. 6×16²+14×16¹+15×16⁰
A · D and E have digit values 13 and 14.
May2024 Q2

1’s complement of 1011101 is _____.

A. 0101110
B. 1001101
C. 0100010
D. 1100101
C · Invert each of the seven input bits.
May2024 Q3

Which of the following gate will give a 0 when both of its inputs are 1?

A. AND
B. OR
C. NAND
D. EXOR
C or D · NAND negates 1 AND 1 and XOR of equal inputs is also zero.
May2024 Q4

_____ are universal gates.

A. NOT
B. NAND & NOR
C. AND
D. NOT, AND & OR
B · Either NAND alone or NOR alone can synthesize all Boolean functions.
May2024 Q10

According to De-Morgan’s theorem: NAND = _____.

A. Bubbled AND
B. Bubbled NOR
C. Bubbled XOR
D. Bubbled OR
D · NAND equals OR with both inputs complemented.
Nov2024 Q1

Reflected binary code is also known as

A. BCD Code
B. Binary Code
C. ASCII Code
D. Grey Code
D · The reflected construction produces Gray code.
Nov2024 Q2

Which of the following is the correct hexadecimal representation for the decimal number 255?

A. FF
B. F0
C. FE
D. F1
A · 255 = 15×16 + 15.
Nov2024 Q3

What is the 2’s complement of the binary number 00001101?

A. 11110010
B. 11110011
C. 11110001
D. 11101101
B · Invert and add one within eight bits.
Nov2024 Q4

What is the gray code equivalent of the binary number 11011?

A. 10110
B. 10001
C. 11101
D. 10010
A · Keep the MSB and XOR successive binary bits.
Jun2025 Q1

How many bits are used to represent each decimal digit in BCD?

A. 2 bits
B. 3 bits
C. 4 bits
D. 8 bits
C · The 8421 code uses one four-bit pattern per digit.
Jun2025 Q2

Convert the binary number 0110011 into its 2’s complement.

A. 1001000
B. 1001101
C. 1001100
D. 0110011
B · Invert the bits to 1001100 and add one.
Jun2025 Q3

High level design is exhibited in

A. Computer Architecture
B. Computer Organization
C. Computer BIOS
D. Computer Architecture and Organization
A · Architecture specifies the programmer-visible machine and interfaces.
Jun2025 Q4

Generate the gray code for the binary number 1010.

A. 1111
B. 1001
C. 1100
D. 1000
A · Keep the leading bit and XOR each adjacent pair.
Jul2025 Q1

Identify The Binary Representation of Decimal Number 42

A. 101010
B. 101111
C. 111100
D. 1110000
A · 42 decomposes into 32, 8 and 2.
Jul2025 Q2

Find the grey code for binary value 1011110

A. 1100111
B. 1100110
C. 1110001
D. 1110000
C · XOR the unsigned binary pattern with that pattern shifted right once.
Jul2025 Q3

The 2’s complement of the binary number 101101 is

A. 011010
B. 100010
C. 100010
D. 010011
D · Complement six bits, then add one.
Jul2025 Q4

Parity code is used for the purpose of

A. Code Conversion
B. Correcting Errors
C. Detecting Errors
D. Decoding
C · A single parity bit detects an odd number of flipped bits.
Nov2025 Q1

The octal equivalent of the decimal number (417)₁₀ is _____.

A. (641)₈
B. (619)₈
C. (640)₈
D. (598)₈
A · 417 = 6×64 + 4×8 + 1.
Nov2025 Q2

On subtracting (010110)₂ from (1011001)₂ using 2’s complement, we get _____.

A. 0111001
B. 0111011
C. 0110110
D. 1000011
D · At seven bits the unsigned subtraction gives 89 − 22 = 67.
Nov2025 Q3

The given hexadecimal number (1E.53)₁₆ is equivalent to _____.

A. (35.684)₈
B. (36.246)₈
C. (34.340)₈
D. (35.599)₈
B · Convert each hexadecimal digit to four bits, then regroup into triplets around the point.
Nov2025 Q4

If the number of bits in the sum exceeds the number of bits in each added numbers, it results in _____.

A. Successor
B. Overflow
C. Underflow
D. Predecessor
B · A result that cannot fit the given width overflows under the stated representation.
May2026 Q1

The representation of octal number (532.2)H in decimal is

A. (346.25)₁₀
B. (532.864)₁₀
C. (340.67)₁₀
D. (531.668)₁₀
A · The stem says octal, so use weights 64, 8, 1 and 1/8.
May2026 Q2

How many bits are used to represent each decimal digit in BCD?

A. 2 bits
B. 3 bits
C. 4 bits
D. 8 bits
C · 8421 BCD uses four bits per decimal digit.
May2026 Q3

Generate the gray code for the binary number 1010.

A. 1111
B. 1001
C. 1100
D. 1000
A · Keep the leading bit and XOR adjacent pairs.
May2026 Q4

_____ are universal gates.

A. NOT
B. NAND & NOR
C. AND
D. NOT, AND & OR
B · Each of NAND and NOR can synthesize all basic gates.
May2026 Q9

According to De-Morgan’s theorem: NAND =

A. Bubbled XOR
B. Bubbled NOR
C. Bubbled AND
D. Bubbled OR
D · NAND equals OR with both inputs complemented.
Dec2018-IT0205 Q6

Find the 1’s and 2’s complement of the number (10110)₂.

Short answer · 01001 and 01010. Invert all five bits, then add one for the second answer.
Nov2019 Q5

Perform binary addition of 110H 0010 is _____.

A. 1110
B. 1111
C. 0111
D. 11101
A intended · Reading the blurred first operand as 1100₂ gives 1100₂ + 0010₂ = 1110₂.
Nov2019 Q7

_____ is a straight forward method of representing positive and negative number.

A. Radix
B. Complement
C. Sign magnitude
D. Encode
C · Sign magnitude stores a sign bit and an ordinary magnitude.
Nov2019 Q8

The sign magnitude representation of −9 is _____.

A. 00001001
B. 11111001
C. 10001001
D. 11001
C or D · Both are sign-magnitude forms, with eight and five bits respectively.

Opens chatgpt.com in a new tab with a ready-made prompt for this topic.

Unit 1 checklist

Before you move on, can you do each of these without looking?

0 of 4 topics complete

Not sure about one? Go back to it in the topic list and press Next step through the worked question once more. Ticks are saved in this browser. Final checklist for the subject →

Unit complete. Up next: Unit 2, Computer structure, instructions and addressing.

All units