-
this is a bit:
0,1 -
a
byteconsists of 8bits:10101111 -
4
bitsalso called anibble -
an
8-bit machineusually refer to the size of the instructions? -
hexadecimalis a neat way to representbinary-
one single hexadecimal value can represent up to
4 bits-
0b0000=0x1 -
0b1111=0xF
-
-
1 bytes = 8 bits = 2 hexadecimal values
-
-
bitwise operator
-
shift left
>>: shift number of bits to the left-
10 >> 1 = 1
-
-
shift right
<<: shift number of bits to the right-
10 << 1 = 100
-
-
and
&-
a b a & b 1 1 1 0 1 0 0 1 0 0 0 0
-
-
or
|-
a b a | b 0 0 0 0 1 1 1 0 1 1 1 1
-
-
not
!-
a !a 1 0 0 1
-
-
exclusive or
^-
a b a ^ b 0 0 0 0 1 1 1 0 1 1 1 0
-
-