2080 7

CSC114 · 2080 · 5 marks

What is ASCII? Convert 0.2345 from Base 10 to Base 2.

What is ASCII? Convert 0.2345 from Base 10 to Base 2. [5]

Introduction to Information TechnologyChapter 5: Data RepresentationConversion from Decimal to Binary, Octal, HexadecimalNumerical: base conversion decimal to binary

ASCII and Base 10 to Base 2 Conversion

Given data

  • Number to convert: $0.2345$ (Base 10)
  • Target base: Base 2
  • Concept asked: ASCII

Part 1: What is ASCII? (2 marks)

ASCII stands for American Standard Code for Information Interchange.

  • It is a character encoding standard that assigns a unique numeric code to each character so that text can be represented, stored, and processed in computers.
  • Standard ASCII uses 7 bits, giving $2^7 = 128$ possible codes (0 to 127).
  • It encodes:
    • Uppercase letters A-Z (65-90)
    • Lowercase letters a-z (97-122)
    • Digits 0-9 (48-57)
    • Special/punctuation characters
    • Control characters (e.g., newline, tab, carriage return)
  • Example: 'A' = 65, 'a' = 97, '0' = 48.
  • Extended ASCII uses 8 bits to represent 256 characters.

Part 2: Convert 0.2345 to Base 2 (3 marks)

Method: Repeatedly multiply the fractional part by 2; the integer part of each product gives the next binary bit (read top to bottom).

StepFraction×2ProductBit
10.2345×20.46900
20.4690×20.93800
30.9380×21.87601
40.8760×21.75201
50.7520×21.50401
60.5040×21.00801
70.0080×20.01600
80.0160×20.03200

Reading the integer bits from top to bottom:

$$(0.2345)_{10} \approx (0.00111100)_2$$

Verification: $$0\cdot2^{-1}+0\cdot2^{-2}+1\cdot2^{-3}+1\cdot2^{-4}+1\cdot2^{-5}+1\cdot2^{-6}$$ $$= 0.125 + 0.0625 + 0.03125 + 0.015625 = 0.234375 \approx 0.2345 \checkmark$$

Note: This is a non-terminating binary fraction, so the answer is an approximation to 8 binary places.

$$\boxed{(0.2345)_{10} \approx (0.00111100)_2}$$

Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.