What does << do and mean in Ruby

I know this is a strangely simple question for you Ruby gurus but I have honestly googled and didn't find this in the documentation. I also didn't find a good explanation anywhere else. Please tell me what << means and why i'd use it. Thanks
Who is Participating?
GaryConnect With a Mentor Commented:

Binary Left Shift Operator.
The left operands value is moved left by the number of bits specified by the right operand.

a = 0011 1100
a << 2 will give 240 which is 1111 0000

The Google keyword is operators ;o)
Mark_CoAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.