+ 1

Can't bit shift characters?

Aren't they treated as binaries? or bits?

7th Feb 2018, 12:27 PM
MrCoder
MrCoder - avatar
6 odpowiedzi
+ 8
left shift and right shift are nothing but dividing and multiplying by 2 , so u get the corresponding character for the doubled or halfed value, as in Martin's example 32 for space x<<1, ( means multiplied by 2 one times ) hence 64 so @
8th Feb 2018, 3:45 AM
Morpheus
Morpheus - avatar
+ 4
what do you mean by bit shift characters as far as i know you can only shift bits(not bit shift char).
7th Feb 2018, 2:53 PM
shobhit
shobhit - avatar
+ 1
But why can you bit shift integers? 6 << 1 returns 12
7th Feb 2018, 3:40 PM
MrCoder
MrCoder - avatar
0
That only applies to certain languages, I'll try and tell you if it works when I convert it to string
8th Feb 2018, 1:17 AM
MrCoder
MrCoder - avatar
0
Hey it worked lmao
8th Feb 2018, 1:18 AM
MrCoder
MrCoder - avatar