What is a Left Shift?

What is a Left Shift?



When shifting left, the most significant bit is lost, and a 0 bit is inserted on the other end. The left shift operator is usually written as "<<". A single left shift multiplies a binary number by 2.

// 2 bit shifted left by 1 space = 4

0010 << 1 -> 0100 = 4

// 2 bit shifted left by 2 spaces = 8

0010 << 2 -> 1000 = 8

Popular posts from this blog

After analyzing the model, your manager has informed that your regression model is suffering from multicollinearity. How would you check if he's true? Without losing any information, can you still build a better model?

Is rotation necessary in PCA? If yes, Why? What will happen if you don't rotate the components?

What does Latency mean?