(a) Convert the denary number 347 to hexadecimal. Show your working. [3] (b) Verify your answer by converting it back to denary. Show your working. [2] (c) ...

Assessment: Computer Science 0478 | Paper 1 Mock 01 | Computer Systems Subject: Computer Science - 0478

Question 1 Report

(a) Convert the denary number 347 to hexadecimal. Show your working.

[3]

(b) Verify your answer by converting it back to denary. Show your working.

[2]

(c) Explain one situation where a programmer would need to convert between denary and hexadecimal.

[1]

(d) State how many bytes are needed to store the denary value 347.

[2]

Answer Details

(a) To convert denary 347 to hexadecimal, use repeated division by 16:

  1. 347 / 16 = 21 remainder 11 (B in hex).
  2. 21 / 16 = 1 remainder 5.
  3. 1 / 16 = 0 remainder 1.

Read the remainders from bottom to top: 347 in hexadecimal = 15B. [3]

(b) Convert 15B hex back to denary to verify:

  • 1 x 256 (16\(^2\)) = 256
  • 5 x 16 (16\(^1\)) = 80
  • B (11) x 1 (16\(^0\)) = 11

256 + 80 + 11 = 347. Verified. [2]

(c) A programmer would need this conversion when defining colours for web design (e.g. converting RGB values from denary to hex colour codes) or when reading hexadecimal memory addresses during debugging and needing to understand the denary value stored at that location. [1]

(d) A single byte can store values from 0 to 255. Since 347 > 255, it cannot fit in 1 byte. [1] Two bytes (16 bits) can store values from 0 to 65535, which is more than enough for 347. Therefore 2 bytes are needed. [1]

Download The App On Google Playstore

Everything you need to excel in your exams

Green Bridge CBT Mobile App
Personalized AI Learning Chat Assistant
200,000+ Exam Questions Across IGCSE, JAMB, WAEC & NECO
Over 3,900 Lesson Notes
Offline Support - Learn Anytime, Anywhere
Green Bridge Timetable
Literature Summaries & Potential Questions
Track Your Performance & Progress
In-depth Explanations for Comprehensive Learning