Representing and manipulating data in computers
Representing and manipulating data in computers

This free course is available to start right now. Review the full course description and key learning outcomes and create an account and enrol if you want a free statement of participation.

Free course

Representing and manipulating data in computers

7.5 Dividing 2's complement integers

Just as multiplication can be turned into repeated additions, so division can be turned into repeated subtractions. And just as shifting a binary integer one place to the left equates to multiplying by two, so shifting a binary integer one place to the right equates to dividing by two.

Activity 27 (Exploratory)

How many places to the right do you think you would need to shift a binary integer to achieve division by eight?

Discussion

You probably guessed that if shifting one place to the right is dividing by two then shifting two places to the right is dividing by four and shifting three places to the right is dividing by eight. And this is indeed the case.

Note that in integer arithmetic a fractional result is not possible. So if the divisor does not go exactly into the number to be divided then the result will have to be in the form of ‘it divides in such-and-such a number of times, with a remainder of such-and-such’.

T224_2

Take your learning further

Making the decision to study can be a big step, which is why you'll want a trusted University. The Open University has 50 years’ experience delivering flexible learning and 170,000 students are studying with us right now. Take a look at all Open University courses.

If you are new to university level study, find out more about the types of qualifications we offer, including our entry level Access courses and Certificates.

Not ready for University study then browse over 900 free courses on OpenLearn and sign up to our newsletter to hear about new free courses as they are released.

Every year, thousands of students decide to study with The Open University. With over 120 qualifications, we’ve got the right course for you.

Request an Open University prospectus