Stibitz code

Stibitz code also known as excess-3 encoding has offset of 3

Encoder

in

in(3)

in(2)

in(1)

in(0)

out

out(3)

out(2)

out(1)

out(0)

0

0

0

0

0

3

0

0

1

1

1

0

0

0

1

4

0

1

0

0

2

0

0

1

0

5

0

1

0

1

3

0

0

1

1

6

0

1

1

0

4

0

1

0

0

7

0

1

1

1

5

0

1

0

1

8

1

0

0

0

6

0

1

1

0

9

1

0

0

1

7

0

1

1

1

a

1

0

1

0

8

1

0

0

0

b

1

0

1

1

9

1

0

0

1

c

1

1

0

0

a

1

0

1

0

d

b

1

0

1

1

e

c

1

1

0

0

f

d

1

1

0

1

10

e

1

1

1

0

11

LUT function names can be written as follows. As inputs are essentially used to index the output values from FPGA programming, the FPGA function name is derived from output values represented in hexadecimal.

\begin{align*} out(3) = f_{03e0} \\ out(2) = f_{021e} \\ out(1) = f_{0199} \\ out(0) = f_{0155} \end{align*}

4-input LUT can be used to implement each output of decimal to excess-3 encoder, don't care values are substituted with 0-s.

1 0 0 1 in(1) in(0) 1 0 0 1 1 0 0 0 0 0 0 0 in(2) in(3) out(1) 16:1

Implementation of one of the outputs

Decoder

in

in(3)

in(2)

in(1)

in(0)

out

out(3)

out(2)

out(1)

out(0)

0

0

0

0

0

-3

1

0

0

0

1

-2

2

0

0

1

0

-1

3

0

0

1

1

0

0

0

0

0

4

0

1

0

0

1

0

0

0

1

5

0

1

0

1

2

0

0

1

0

6

0

1

1

0

3

0

0

1

1

7

0

1

1

1

4

0

1

0

0

8

1

0

0

0

5

0

1

0

1

9

1

0

0

1

6

0

1

1

0

a

1

0

1

0

7

0

1

1

1

b

1

0

1

1

8

1

0

0

0

c

1

1

0

0

9

1

0

0

1

d

1

1

0

1

a

e

1

1

1

0

b

Grey mux Stibitz VHDL KTH