# DES: Computing the output of S-Box 1?

If the 48-bit input to the S-box is 0xAAAAAAAAAAAA, what are the first four bits emitted by S-box 1?

I know that an S-Box takes n inputs and give m outputs and that n != m, but I really don't see how they got that answer.

Since a S-Box takes 3 bits and maps it to 2 bits how can you predict what AAA will be?

• About which S-Box are we talking here? – SEJPM Mar 27 '16 at 16:25
• The DES S-Box and I assume the one at the end means it is a one dimensional S-box. – Bob Mar 27 '16 at 16:29
• Actually, $n \ne m$ is not a requirement on sboxes; consider the AES sbox, which has $n = m = 8$ – poncho Mar 27 '16 at 17:06

DES has a total of 8 s-boxes which takes 6-bit input (say $b_1b_2 ... b_6$) and produces 4-bit output. The s-boxes are the 2-dimensional array of size 4x16. The bits $b_1b_6$ determine the row of the s-box and bits $b_2b_3b_4b_5$ determine the column. The value of 6-bit input is substituted with the value at cell $S_i[b_1b_6][b_2b_3b_4b_5]$.
In your given question the output of 1st s-box will be the value of $S_1[3][15]$