It depends.
If you are using unsigned numbers, then the following assumption is made:
0b11 = 0b00000011,
in which case the answer is;
2^1 + 2^0 = 2 + 1 = 3
If you are using signed numbers, than a binary number in the form 0b11 would be interpreted as negative because the leading bit is equal to 1. For signed numbers, the '1' in the leading bit is extended, thus:
0b11 = 0b11111111
In order to interpret this number, negate the number by flipping the bits and adding 1:
0b11111111
0b00000000 (bits flipped)
0b00000001 (added one)
The positive representation of 0b11111111 is equal to 0b00000001, which is equal to 1, thus
0b11 = 0b11111111 = -1
Copyright © 2026 eLLeNow.com All Rights Reserved.