1.2.27

Converting Binary & Images

Test yourself on Converting Binary & Images

Test your knowledge with free interactive questions on Seneca — used by over 10 million students.

Converting Binary and Images

All images are stored as binary. It's important to be able to convert between an image and its binary representation.

Binary to image

Binary to image

  • In a black and white image, each pixel is represented by 1 bit:
    • A 0 will represent a black area.
    • A 1 will represent a white area.
  • The image will be represented by a binary string. Use the value of each bit to colour each pixel in the right colour.
  • The binary string starts at the top-left of the image, and represents the first row, followed by the second row, and continues until the end of the image.
Image to binary

Image to binary

  • Each pixel of the image will be represented by one bit of the binary string.
  • Starting at the top left, and working across the first row:
    • Write a 0 if the pixel is black.
    • Write a 1 if the pixel is white.
  • Continue this process until the end of the image.
Jump to other topics
1

Computer Systems

1.1

Systems Architecture

1.2

Memory & Storage

1.3

Computer Networks, Connections & Protocols

1.4

Network Security

1.5

Systems Software

1.6

Ethical, Legal, Cultural & Environmental Concern

2

Computational Thinking, Algorithms & Programming

2.1

Algorithms

2.2

Programming Fundamentals

2.3

Producing Robust Programs

2.4

Boolean Logic

2.5

Programming Languages & IDEs

Practice questions on Converting Binary & Images

Can you answer these? Test yourself with free interactive practice on Seneca — used by over 10 million students.

  1. 1
Answer all questions on Converting Binary & Images

Unlock your full potential with Seneca Premium

  • Unlimited access to 10,000+ open-ended exam questions

  • Mini-mock exams based on your study history

  • Unlock 800+ premium courses & e-books

Get started with Seneca Premium