<reponame>Miillky/uvod_u_programiranje
# Tablica operacija
# 0&0 0
# 0&1 0
# 1&0 0
# 1&1 1
# 0|0 0
# 0|1 1
# 1|0 1
# 1|1 1
# 0^0 0
# 0^1 1
# 1^0 1
# 1^1 0

2|4 #6
bin(2) #'ob10
bin(4) #'ob100'
bin(6) #'ob110'
6|9 #15
bin(6) #'0b110'
bin(9) #'0b1001'
bin(15) #'0b1111'

2^4 #6
6^9 #15

2&4 #0
6&9 #0

2<<3 #32
bin(2) #'0b10'
bin(32) #0b100000
2<<4 #0
bin(2) #'0b10'
bin(0) #'0b0'

~5 #-6
bin(5) #'0b101'
bin(-6) #'-0b110'
# Tablica operacija
# 0&0 0
# 0&1 0
# 1&0 0
# 1&1 1
# 0|0 0
# 0|1 1
# 1|0 1
# 1|1 1
# 0^0 0
# 0^1 1
# 1^0 1
# 1^1 0

2|4 #6
bin(2) #'ob10
bin(4) #'ob100'
bin(6) #'ob110'
6|9 #15
bin(6) #'0b110'
bin(9) #'0b1001'
bin(15) #'0b1111'

2^4 #6
6^9 #15

2&4 #0
6&9 #0

2<<3 #32
bin(2) #'0b10'
bin(32) #0b100000
2<<4 #0
bin(2) #'0b10'
bin(0) #'0b0'

~5 #-6
bin(5) #'0b101'
bin(-6) #'-0b110'
# Tablica operacija # 0&0 0 # 0&1 0 # 1&0 0 # 1&1 1 # 0|0 0 # 0|1 1 # 1|0 1 # 1|1 1 # 0^0 0 # 0^1 1 # 1^0 1 # 1^1 0 #6 #'ob10 #'ob100' #'ob110' #15 #'0b110' #'0b1001' #'0b1111' #6 #15 #0 #0 #32 #'0b10' #0b100000 #0 #'0b10' #'0b0' #-6 #'0b101' #'-0b110'