Thank you so much. ðŸ™‚

]]>I apologize in advance for my late reply to your comment.

Its bit shifting.

What programming language that code is in I’m not sure exactly.

But I can evaluate it and break it down for you.

But || is an operator in a programming language. Its a **boolean or operator**. Its based on boolean logic.

True or false.

The OR operator.

It compares two expressions.

An expression is a value that represents a variable.

a + b = $bob

A variable is a value that can be held and used for later.

A variable can be thought of as a bucket. You store information in a bucket. But can be used later. Same as a variable.

Lets take this for example for the OR operator.

Do you like pizza or ice-cream better?

I comparing the first expression pizza to the second comparison ice-cream.

Its **true** if you like pizza and ice-cream.

Its also **true** if you like either better.

But what if you don’t like pizza or ice-cream at all.

It will return **false**.

$number is a variable. Same as $decNumber

$number = shift

Shift the variable $number OR $decNumber

Shift the variable $number then compare it to the variable $decNumber.

**Bit shifting** is shifting bits to the left or right.

01101

If you shift a bit to the left **<<** then the digits shift to the left from one position.

Shifting **to the left** you would get…

11010

We shifted 01101 to 11010

———

0 gets added to the end of the byte.

If you shift a bit to the right **>>** then the digits shift to the right from one position.

Shifting **to the right** you would get…

001101

———

We shifted We shifted 01101 to 001101

0 gets added to the beginning of the byte.

I hope this helps. If you have any more questions feel free to ask. ðŸ™‚

Thank you very much for your explanation , I have found a folmrua of converting decimal to binary in a website that works for me but I really don’t understand how it works (it uses shift and || ):my $number = shift || $decNumber;Could you please explain how this works ?Thanks in advance.

]]>Thank you for letting me know.

Where are you getting this error at?

When you click the link to the bloglovin page?

Or are you getting the error on my blog all together?

– Julia

I am curious what class is that?

That is so awesome you learned about it in your math elementary teachers course.

You are right. It does make you look at the decimal system a different way.