Usually you copy the most significant bits to the lower bits, so if you have five bits as follows:
Bit position: 4 3 2 1 0
Bit variable: A B C D E
You would expand this to eight bits like:
Bit position: 7 6 5 4 3 2 1 0
Bit variable: A B C D E A B C
Thus, all zeros remain all zeros, all of them become all, and the values between the scales, respectively.
( , A, B, C .. - , ).