1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
xxTIMURxx [149]
3 years ago
12

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.
Computers and Technology
1 answer:
Genrish500 [490]3 years ago
8 0

Answer:

Aee explaination

Explanation:

#Implementation of shiftLeft method

#which shifts the bits in its input one

#place to tge left

def shiftLeft(bitstring):

bitstring = bitstring[1:]+bitstring[0]

#return as bit string format

return bitstring

#Get the input from user

bits = input("Enter a string of bits: ")

#call the shiftLeft method which returns the value

# that is stored in leftShift

leftShift = shiftLeft(bits)

#Display the output

print()

print(leftShift)

print()

You might be interested in
What allows people to create their own radio shows over the internet?
Alex787 [66]
Broadcasting sites, greater internet freedom,. 
6 0
3 years ago
___ is a career discipline focusing on helping companies use computer technology effectively.
pickupchik [31]

Answer:

A (information technology)

Explanation:

4 0
2 years ago
Which of these statements performs real number quotient division using type casting?
lara [203]

Answer:

Double x = 35 / 10;

Explanation:

Java provides simple data types for representing integers, real numbers, characters, and Boolean types. These types are known as _ or fundamental types.

<3

3 0
2 years ago
Your hometown probably has little to offer in terms of photography because you've already seen it. True False
Nikitich [7]
False it the answer bro
4 0
3 years ago
Create a class called Fraction. Provide a constructor that takes 2 integers. Provide methods for:
tekilochka [14]

Answer:

Explanation;

else

System.out.println("f1 and f2 are not equal");

switch (input.charAt(0)

{

case '+':

f3 = f1.add(f2);

System.out.println("f1+f2=" + f3);

break;

case '-':

f3 = f1.subtract(f2);

System.out.println("f1-f2=" + f3);

break;

case '*':

f3 = f1.multiply(f2);

System.out.println("f1*f2="+f3);

break;

case '/':

f3 = f1.divide(f2);

System.out.println("f1/f2="+f3);

break;

default:

System.out.println("Illegal command: " + input );

break;

}

}// end of while loop

} // end of main

}

 

Note ; this is the last part of the programme check the attachment from 1-5  this is the 6th .

8 0
3 years ago
Other questions:
  • It is important for a writter to include voice and point of view in writting because _______
    11·1 answer
  • Controlled intersections use some form of which of the following:
    7·1 answer
  • You can combine the algorithms for converting between infix to postfix and for evaluating postfix to evaluate an infix expressio
    13·1 answer
  • Remote wiping is a device security control that allows an organization to remotely erase data or email in the event of loss or t
    10·2 answers
  • What is copy and paste?
    13·2 answers
  • What are the benefits of building redundancy into a network?
    12·1 answer
  • Supplies/material used in iron​
    11·1 answer
  • Collaboration, listening, and negotiating are considered __________ skills.
    11·1 answer
  • Question 1 (1 point)
    9·1 answer
  • When you use the predict step in the IPDE process you
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!