binary shift right of two places on the binary number 00110100.

Describe a shift that can be used to double the value of the binary number 00100100.

Complete a 2 place right shift on the binary number 11001011.

verry confused plz help plx plz plz i watchd every video got iit wrong plz help

Guest Jun 26, 2020

#1**+1 **

Since it is a BINARY number ....every position to the left is TWICE the one to the right (edited)

example 010 is twice 001 100 is twice 010

so shift the number to the left ONE space to double it

00100100 to double it shift it one space left

01001000

Binary shift right two places

00110100

00001101

ElectricPavlov Jun 26, 2020

edited by
ElectricPavlov
Jun 26, 2020

edited by ElectricPavlov Jun 26, 2020

edited by ElectricPavlov Jun 26, 2020

edited by ElectricPavlov Jun 26, 2020

edited by ElectricPavlov Jun 26, 2020

edited by ElectricPavlov Jun 26, 2020

edited by ElectricPavlov Jun 26, 2020

#2**+1 **

A story:

Imagine a wall being placed on the right of a binary number.

Whenever a number gets left shifted, a zero comes out of the wall to fill the gap between the wall and the number.

Whenever a number gets right shifted, the last digit just goes through the wall and never come back again.

Now, let's try left shifting and right shifting some numbers.

right shift of two places on 00110100.

The bar denotes the "wall", and blue digits means the digit is gone.

\(00110100\Big|\)

right shift once

\(0011010\Big|\color{blue}0\)

right shift once more

\(001101\Big|\color{blue}00\)

The result should be \(001101\), but because you needs 8 bits for a byte, it becomes \(00001101\). We add zeroes in front when we don't have enough *digits*.

Hints for the others:

Q2) Think of what a left shift and a right shift really does on the value of the binary number by trying out few examples.

Q3) Similar to Q1.

EDIT: Italicized text is what I changed.

MaxWong Jun 26, 2020