A
A
Alex Setup2018-06-05 11:04:03
C++ / C#
Alex Setup, 2018-06-05 11:04:03

Why do two identical commands produce different results?

There are two commands: (~0)<<kand 1<<k
They produce different results. Why?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
OnYourLips, 2018-06-05
@AlexSetup

Tilde zero equals minus one.

A
abdujabbor1987, 2018-06-05
@abdujabbor1987

var_dump((~0) === 1); equals false

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question