The total number is 2 for the number of bits. Thus, eight bits have 2 8 possible values.
If you really mean “how to calculate it,” consider that each bit has two possible values.
So, one bit means 2 values.
Two bits have one set of two values of each possible value of the other bit, therefore
00
01
10
11
which means a total value of 4 (= 2 x 2).
, 8 (= 4 ; 2) . , 8 ; 2; , 16 & times; 2 ..
, - 2 2 , 2 2 , 2 2 , 2 2 , 2 256.