I have a really long truth table and the binary column is showing up like this:

```
A   +   B   =   S   BINARY
0   +   0   =   0   0
0   +   1   =   1   1
0   +   2   =   2   10
0   +   3   =   3   11
0   +   4   =   4   100
0   +   5   =   5   101
0   +   6   =   6   110
0   +   7   =   7   111
0   +   8   =   8   1000
0   +   9   =   9   1001
0   +   10  =   10  1010
0   +   11  =   11  1011
0   +   12  =   12  1100
0   +   13  =   13  1101
0   +   14  =   14  1110
0   +   15  =   15  1111

```

Where the BINARY column `=DEC2BIN(S)`

I need to force the Binary values to have 4 digits all the time. So `0 = 0000`, `3 = 0011`, etc. How do I do this in excel?

**Solution:
`=DEC2BIN(S,6)`**