1

I am learning programming on my own. And as any (good) student, I have hit a road block.

Firstly, I keep reading - The amount of values a bit can store is 2. NO ONE SAYS it's EITHER 0 OR 1.

Secondly - 3 bits can store 8 values...ummm..HOW???

Isn't that even mathematically impossible?

If we were to have a switch... One switch is capable of: ON or OFF Two switches:

Switch 1: ON OFF ON OFF Switch 2: ON OFF OFF ON <- FOUR values.

How do 3 bits add up to 8 values??

Should be six right?

Switch 1: ON OFF ON OFF Switch 2: ON OFF OFF ON Switch 3: ON OFF ON OFF

Can soomeone please help!

0

9 Answers 9

12
000
001
010
011
100
101
110
111

where 0 = OFF and 1 = ON

:)

9

A bit can have 2 values. If there are three bits, 23 = 8.

1
  • $$2^{3} = 8$$ is a solution.
    – user124942
    Nov 27, 2018 at 13:23
4

One bit can store two values. 0 and 1 Two bits can strore four values 00, 01, 10, and 11 three bits can store eight values 000,001,010,011, 100,101,110 and 111.

it means the combination of all the bits represents one value like 010 represents 2 and 101 represents 5. the expression for the same is n bits can represent 2n values because at the heart 1 bit can represent two values.

0
3

Since here we are talking about bits then definetly it means "0/1" which is the representation of "False/True" or "OFF/ON". According to Wiki - A bit is the basic unit of information in computing and digital communications. A bit can have only one of two values, and may therefore be physically implemented with a two-state device. The most common representation of these values are 0 and 1.

So we take three bits and create a truth table, we will get following eight combinations.

[1st bit]   [2nd bit]   [3rd bit]   [Bits into decimal number]
 0              0           0               0
 0              0           1               1
 0              1           0               2
 0              1           1               3
 1              0           0               4
 1              0           1               5
 1              1           0               6
 1              1           1               7

Which shows eight different combinations from 3 bits. I hope this answer your question.

3

Binary - Decimal

00000000 - 0
00000001 - 1
00000010 - 2
00000011 - 3
00000100 - 4
00000101 - 5
00000110 - 6
00000111 - 7

8 bits are grouped together to form a byte. In the above example 1 is represented as 00000001 and 2 is represented as 00000010 and so on. Hope it helps.

0

Consider a bit is either 1 or 0. If you want to know max value of 3 bit, write three 1 because 1 is the max of binary value. That is 111 and check its decimal value which is 7. so 0 to 7 is 8 bit

For 8 bit, binary 11111111, decimal is 255. so 0 t0 255 is 256 is the max value possible

0

Each Switch has two values- (ON, OFF) or (1,0)

Its actually simple SET Cross operation

{(000),(001),(010),(011),(100),(101),(110),(111)} - 8 values

Switch 1 Switch 2 Switch 3 ON ON ON OFF OFF OFF

number of possible combinations of values from each switches is 2 X 2 X 2 = 8

0

I just figured this out myself. I had to realize a few things first.

  1. because a bit can hold 0 or 1, the bit IS 0 or 1.

  2. the amount of bits in question are lined up horizontally. So 4 bits is 4 placeholders. Where each place holder increases the possible amount of values by a multiple of 2.

  3. The amount of values is the amount of different combinations of binary digits there are with the amount of bits in question.

An example with 4 bits:

combinations with no ones: 0000

combinations with one ones: 0001, 0010, 0100, 1000

combinations with two ones: 0011, 0110, 1100, 1001, 1010, 0101

combinations with three ones: 0111, 1011, 1110, 1101

combinations with four ones: 1111

There are 16 different combinations and thus 16 different possible values 4 bits can store. That is why 2^n where n is bits amount and n = 4 is 16.

1 bit: 2 values

2 bits: 4 values

3 bits: 8 values

4 bits: 16 values

-2

with 3 switch : if switch == off ==> binair == 0 if switch == on ==> binair == 1

![look the pict][1]

https://i.stack.imgur.com/bSfha.jpg

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.