Binary and logic gates worksheets to print

A4 data representation worksheets: binary ↔ decimal and hexadecimal, bits and bytes, images as pixel grids, and logic gates AND, OR, NOT, NAND, NOR and XOR with their truth tables and small circuits. Grades 5 to 10, with an answer key.

What do you want to practise?

Teacher guide ↓

Teaching Guide: Binary and Logic Gates

Computers store everything as ones and zeros: numbers, text and pictures. Binary, units of information and logic gates are part of the computing curriculum, and the first ideas (counting in binary, shading a pixel picture) already work in Grades 5 and 6. This free generator makes binary and logic gate worksheets with a computed answer key.

For
Elementary 5th, 6th · Middle & High 7th, 8th, 9th, 10th (ages 10-15)
Subject
Technology › Computational Thinking
Includes
Student sheet and answer key
Format
A4, to print or save as PDF; new exercises every time
Price
Free, no sign-up
Available in
Catalan, Spanish, English
Binary and logic gates worksheets to print: sample printable A4 worksheet, first page of the student sheet Student worksheet
Binary and logic gates worksheets to print: sample answer key of the same worksheet, first page Answer key
Sample made with LearnKits. Every worksheet is new: choose the topic, level and amount and print it for free.

Binary and decimal

With a table of place values, from four bits to a byte, and hexadecimal by grouping bits in fours.

Bits and bytes

Bits, bytes, KB, MB and GB with 1 KB = 1024 bytes, how many values n bits hold and how big a picture is.

Pixel pictures

Decode and encode black-and-white pictures, and run-length code to compress them.

Logic gates

AND, OR, NOT, NAND, NOR and XOR with their symbols and truth tables.

Circuits

Random circuits of two to four gates, with the whole truth table in the answer key.

Answer key

The place values added up, the bits of every picture and every row of the truth tables.

Frequently asked questions about the binary worksheets

Which grades are they for?
Four-bit binary, bits and bytes and 6 × 6 pictures are for Grades 5-6; the byte, KB and MB and AND, OR and NOT gates for Grades 7-8; hexadecimal, NAND, NOR and XOR gates and circuits for Grades 9-10.
Is a KB 1000 or 1024 bytes?
The worksheets use 1 KB = 1024 bytes, as most school computing books do. Strictly, 1024 bytes is a kibibyte (KiB) and 1 kB is 1000 bytes; every sheet’s key says which is used.
How do I convert decimal to binary?
With the table of place values (128, 64, 32, 16, 8, 4, 2, 1): put a 1 under the largest value that fits, subtract it and carry on with what is left. You can also keep dividing by 2 and read the remainders from the bottom up.
What is run-length code?
A way to compress a picture: instead of writing every bit of a row, you write how many white squares come in a row, then how many black ones, and so on to the end. It is a classic CS Unplugged activity.
Which other worksheets go well with these?
Flowcharts and algorithms for programming, electrical circuits for electricity and grid drawing for practising picture coordinates. You will find every resource in technology worksheets.
How do I print only the answer key?
Click Print and choose “Answer key”, or “Worksheet and answer key” for both. You can also save it as a PDF from your browser’s print dialog.