Number system
Binary addition and binary multiplication
Two’s Complement Representation
Queue and Stack
Binary tree
100

Why is it convenient to group binary digits into sets of 4 (from right to left) when converting from binary to hexadecimal?


What is because 16 = 2⁴, so every group of 4 bits corresponds to exactly one hexadecimal digit?

100

In binary arithmetic, the sum of 1 + 1 produces “0” in the current bit. What else happens?


a carry of 1 to the next more significant bit

100

In two’s complement binary representation, how do you find the negative version of a positive binary number?

invert all bits and then add 1 to the result

100

This data structure works on the First-In, First-Out principle — the first element added is the first to be removed.


Queue

100

This term denotes a node that has no children in a tree.

leaf node

200

What is the binary representation of the hexadecimal number 7B3?


0111 1011 0011

(7 → 0111, B → 1011, 3 → 0011)

200

Add the following binary numbers: 1101₂ + 1011₂. What is the correct binary sum?

11000₂ 

Walk through digit-by-digit addition starting from the right, remembering that 1 + 1 = 0 with carry

200

If you use an 8-bit two’s complement number, what is the maximum positive decimal value you can represent?

127 (range is –128 to +127)

200

Name the operation in a stack that adds a new element at the top and the one that removes the top element.


push (add) and pop (remove)

200

Name the binary tree traversal where you visit root → left subtree → right subtree.

pre-order traversal

300

Convert the number 101101101₂ to decimal, and then express the result in hexadecimal.


What is 365₁₀ = 16D₁₆?

(256 + 64 + 32 + 8 + 4 + 1 = 365;
365 ÷ 16 → 16D)

300

Multiply these two binary numbers: 101₂ × 11₂. What is the product in binary?


1111₂

300

The 8-bit two’s complement binary number 11100101₂ is interpreted as what decimal value?

–27

 (flip bits → 0001 1010 + 1 → 0001 1011 = 27)

300

In contrast to a stack (LIFO), this queue operation removes items from the front of the line, not from the back.

dequeue (remove from front)

300

Which traversal order of a binary tree prints elements in non-decreasing order if the tree is a BST?

in-order traversal

400

Perform the binary addition:
10110111₂ + 01101101₂
and express the result in hexadecimal.

10110111

  • 01101101
    = 1 00100100₂,

which equals 124₁₆

400

Compute (111₂ × 101₂) + (110₁₀ converted to binary). Give the final result in binary.

  • 111₂ × 101₂ = 111 × 101 = 100011₂

  • 110₁₀ = 110₂

  • 100011₂ + 110₂ = 100100₂

400

Compute 1011 0011₂ − 0110 1110₂ using two’s complement (ignore any final carry). What is the binary result?

0100 0101₂

400

A queue is initially empty. The following operations are performed:

Enqueue(A)
Enqueue(B)
Enqueue(C)
Dequeue()
Enqueue(D)
Dequeue()

C

400

In a binary search tree containing the values [17, 8, 22], this rule determines where to insert 14.

go left from 17, go right from 8, then insert at the next available node

500

A hexadecimal number has the form A?F₁₆, where the question mark represents an unknown digit.
Its decimal value is 2815.
Find the missing hexadecimal digit.

2815₁₀ = AFF₁₆

500

A digital circuit adds two unknown 4-bit binary numbers. The result is 1 0110₂, and the carry into the fifth bit is 1. If one of the numbers is 1011₂, what is the other?

1101₂

500

You have a 6-bit two’s complement number representing –17. What is its binary representation? (Assume standard two’s complement rules.)

110111₂

(17 = 010001; invert → 101110; +1 → 101111; ensure 6 bits → 110111)  

500

A stack is initially empty. The following operations are performed:

Push(4)
Push(7)
Pop()
Push(9)
Push(2)
Pop()

9

500

Surprise

You have 500 point

M
e
n
u