subject

A bit shift is a procedure whereby the bits in a bit string are moved to the left or to the right. For example, we can shift the bits in the string 1011 two places to the left to produce the string 1110. Note that the leftmost two bits are wrapped around to the right side of the string in this operation.
Define two scripts, shiftLeft. py and shiftRight. py, that expect a bit string as an input.
The script shiftLeft shifts the bits in its input one place to the left, wrapping the leftmost bit to the rightmost position.
The script shiftRight performs the inverse operation.
Each script prints the resulting string.
An example of shiftLeft. py input and output is shown below:
Enter a string of bits: Hello world!
ello world!H
An example of shiftRight. py input and output is shown below:
Enter a string of bits: Hello world!
!Hello world

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 16:30
What type of file does a cookie place on web site visitors' computers so that web site managers can customize their sites to their visitors' preferences?
Answers: 1
question
Computers and Technology, 23.06.2019 12:20
When guido van rossum created python, he wanted to make a language that was more than other programming languages. a. code-based b. human-readable c. complex d. functional
Answers: 1
question
Computers and Technology, 24.06.2019 22:30
Distinguish between a skill resume and a chronological resume and explain when it is best to use each format
Answers: 1
question
Computers and Technology, 25.06.2019 22:40
Steps for turning off 2 step verification on iphones
Answers: 1
You know the right answer?
A bit shift is a procedure whereby the bits in a bit string are moved to the left or to the right....
Questions
question
Biology, 12.04.2021 05:50
question
Health, 12.04.2021 05:50
question
Mathematics, 12.04.2021 05:50
question
Chemistry, 12.04.2021 05:50
Questions on the website: 13722360