CSC114 ยท 2081 ยท 5 marks
What is Unicode? Convert 0.865 from Base 10 to Base 16.
What is Unicode? Convert 0.865 from Base 10 to Base 16. [5]
Unicode and Base 10 to Base 16 Conversion
Part 1: What is Unicode? [2 marks]
Unicode is a universal character encoding standard that assigns a unique number, called a code point, to every character, symbol, and script used in the writing systems of the world.
Key points:
- Developed to overcome the limits of older schemes like ASCII (only 128 characters) and Extended ASCII (256 characters).
- Can represent over 1 million (1,114,112) possible code points, covering nearly all languages (Latin, Devanagari, Chinese, Arabic, etc.), symbols, and emojis.
- Each character has a code point written as
U+XXXX, e.g.U+0041= 'A'. - Encoding forms include UTF-8, UTF-16, and UTF-32.
- Guarantees consistent text representation across platforms, devices, and applications.
Part 2: Convert $0.865_{10}$ to Base 16 [3 marks]
Method: Repeatedly multiply the fraction by 16; the integer part of each product forms the hex digits (top to bottom).
| Step | Multiplication | Product | Integer part (hex digit) | New fraction |
|---|---|---|---|---|
| 1 | $0.865 \times 16$ | $13.840$ | $13 = D$ | $0.840$ |
| 2 | $0.840 \times 16$ | $13.440$ | $13 = D$ | $0.440$ |
| 3 | $0.440 \times 16$ | $7.040$ | $7$ | $0.040$ |
| 4 | $0.040 \times 16$ | $0.640$ | $0$ | $0.640$ |
| 5 | $0.640 \times 16$ | $10.240$ | $10 = A$ | $0.240$ |
Verification of each product:
- $0.865 \times 16 = 13.84$ โ digit D, remainder $0.84$
- $0.84 \times 16 = 13.44$ โ digit D, remainder $0.44$
- $0.44 \times 16 = 7.04$ โ digit 7, remainder $0.04$
- $0.04 \times 16 = 0.64$ โ digit 0, remainder $0.64$
- $0.64 \times 16 = 10.24$ โ digit A, remainder $0.24$
Reading digits top to bottom:
$$0.865_{10} \approx 0.\text{DD70A}_{16}$$
Answer:
$$\boxed{0.865_{10} \approx 0.DD70A_{16}}$$
(The conversion is non-terminating; five hex digits give a close approximation.)
Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.