The DEC2BIN spreadsheet function

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

The DEC2BIN spreadsheet function

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. Which formula converts the number 13 into binary?
A =BIN2DEC(13)
B =DEC2BIN(13)
2. What does =DEC2BIN(13) show in the cell?
A 1101
B 1011
3. What does =DEC2BIN(5,8) show in the cell?
A 00000101
B 10100000
4. What is the job of the 8 in =DEC2BIN(5,8)?
A It sets how many binary digits to show
B It tells the function to add 8 to the number
5. Which cell entry correctly converts the decimal number sitting in cell A2?
A =DEC2BIN(A2:)
B =DEC2BIN(A2)

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1=DEC2BIN(13) AConverts the decimal number 13 into binary, giving 1101
2=DEC2BIN(5,8) B=DEC2BIN(A2)
3To get the binary form of the number in cell A2, put the cell reference inside the function CThe places argument is too small. 13 needs 4 binary digits (1101), so asking for only 2 places gives an error. Use at least 4, like =DEC2BIN(13,4).
4To convert a whole column of numbers, write the formula once and copy it down so the reference moves to A3, A4 and so on DThe person typed the binary answer instead of the decimal number. DEC2BIN needs the decimal input, so it should be =DEC2BIN(13) to get 1101.
5=DEC2BIN(13,2) E=DEC2BIN(A2)
6=DEC2BIN(1101) FConverts 5 to binary and pads it with zeros to 8 places, giving 00000101

Definitions

=DEC2BIN(13)

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
=_______(13)
2.
=DEC2BIN(__)
3.
=DEC2BIN(5,_)
4.
_DEC2BIN(13)
5.
=DEC2BIN(A2,_)

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A A1: Number
B B1: Binary
C B2: =DEC2BINARY(A2)
D B3: =DEC2BIN(A3)
Question 2
A DEC2BIN(13)
B Result: 1101
C Result is text, not a number
Question 3
A A2: 5
B B2: =DEC2BIN(8,A2)
C Result: 00000101
Question 4
A A2: 13
B B2: =BIN2DEC(A2)
C Result: 1101
Question 5
A A1: Number
B B1: 8-bit binary
C A2: 6
D B2: =DEC2BIN(A2,8
E Result: 00000110

Answer Key

The DEC2BIN spreadsheet function
Section A: Quick Questions
Q1
B — =DEC2BIN(13)
Q2
A — 1101
Q3
A — 00000101
Q4
A — It sets how many binary digits to show
Q5
B — =DEC2BIN(A2)
Section B: Match the Pairs
Q1
=DEC2BIN(13) → Converts the decimal number 13 into binary, giving 1101
Q2
=DEC2BIN(5,8) → Converts 5 to binary and pads it with zeros to 8 places, giving 00000101
Q3
To get the binary form of the number in cell A2, put the cell reference inside the function → =DEC2BIN(A2)
Q4
To convert a whole column of numbers, write the formula once and copy it down so the reference moves to A3, A4 and so on → =DEC2BIN(A2)
Q5
=DEC2BIN(13,2) → The places argument is too small. 13 needs 4 binary digits (1101), so asking for only 2 places gives an error. Use at least 4, like =DEC2BIN(13,4).
Q6
=DEC2BIN(1101) → The person typed the binary answer instead of the decimal number. DEC2BIN needs the decimal input, so it should be =DEC2BIN(13) to get 1101.
Section C: Definitions
Q1
=DEC2BIN(13) — A spreadsheet function that converts a decimal whole number into binary text. =DEC2BIN(13) gives 1101. Add places to pad with zeros, e.g. =DEC2BIN(5,8) gives 00000101.
Section D: Fill in the Blanks
Q1
=DEC2BIN(13)
Q2
=DEC2BIN(A2)
Q3
=DEC2BIN(5,4)
Q4
=DEC2BIN(13)
Q5
=DEC2BIN(A2,8)
Section E: Spot the Error
Q1
C — The function is called DEC2BIN, not DEC2BINARY. A spreadsheet gives an error for a name it does not know. It should be =DEC2BIN(A2).
Q2
A — A spreadsheet formula must start with =. Without it the cell just shows the text DEC2BIN(13). It should be =DEC2BIN(13).
Q3
B — The number to convert comes first and the places (width) comes second. The formula should be =DEC2BIN(A2,8) to give 00000101.
Q4
B — BIN2DEC goes the other way, from binary to decimal, so it can't convert 13. To turn a decimal number into binary, use =DEC2BIN(A2).
Q5
D — The closing bracket is missing, so the formula is incomplete. It should be =DEC2BIN(A2,8).