Can't bit shift characters? | Sololearn: Learn to code for FREE!


Can't bit shift characters?

Aren't they treated as binaries? or bits?

2/7/2018 12:27:56 PM


6 Answers

New Answer


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 @


what do you mean by bit shift characters as far as i know you can only shift bits(not bit shift char).


But why can you bit shift integers? 6 << 1 returns 12


That only applies to certain languages, I'll try and tell you if it works when I convert it to string


Hey it worked lmao