IBDP Computer Science A1.2 Data representation and computer logic HL Paper 1- New Syllabus

Question

Assume that integers are represented using $8$ bits.

(a) The hexadecimal representation of a particular integer is $\text{7A}$.

State the binary representation of this integer. $[1]$

(b) The binary representation of a particular integer is $00011100$.

State the hexadecimal representation of this integer. $[1]$

Most-appropriate topic code (CED):

TOPIC A1.2: Data representation and computer logic — parts (a) and (b)
▶️ Answer/Explanation
Detailed solution

(a)
Each hexadecimal digit corresponds to exactly $4$ binary bits.

For $\text{7A}$:

$\text{7}=0111$
$\text{A}=1010$

Combining the two groups:

$\text{7A}=0111\ 1010$

Therefore, the $8$-bit binary representation is:

$\boxed{01111010}$

Answer: $01111010$

(b)
To convert an $8$-bit binary number to hexadecimal, separate it into groups of $4$ bits from the right:

$00011100=0001\ 1100$

Convert each group to hexadecimal:

$0001=\text{1}$
$1100=\text{C}$

Therefore:

$00011100=\text{1C}$

$\boxed{\text{1C}}$

Answer: $\text{1C}$

Question 

Construct a truth table for the following expression:
X = NOT A OR B AND C OR NOT B \( [4] \)

Most-appropriate topic code (CED):

A1.2: Data representation and computer logic
▶️ Answer/Explanation
Detailed solution

The expression is:

\( X = \mathrm{NOT}\ A\ \mathrm{OR}\ (B\ \mathrm{AND}\ C)\ \mathrm{OR}\ \mathrm{NOT}\ B \)

The AND operation is evaluated before the OR operations. The completed truth table is:

ABCX
0001
0011
0101
0111
1001
1011
1100
1111

Answer: The truth table has output \(X=0\) only when \(A=1,\ B=1,\ C=0\). For all other input combinations, \(X=1\).

Question 

Construct a truth table for the following expression:

W = C OR NOT B AND NOT A OR B\( [4] \)

Most-appropriate topic code (CED):

A1.2: Data representation and computer logic
▶️ Answer/Explanation
Detailed solution

The completed truth table is:

ABCW
0001
0011
0101
0111
1000
1011
1101
1111

Answer: The value of W is \(0\) only when \(A=1\), \(B=0\), and \(C=0\). It is \(1\) for all other combinations.

Scroll to Top