Running head: Module 1 Homework Assignment Week 3
Module 1 Homework Assignment Week 3
Allied American University
This paper was prepared for CIS 105, Module 1 Homework Assignment Week 3 taught by Instructor Hannes Bogacs.
Directions: There are two parts (I and II) to this homework assignment. Complete both in two separate files then submit both in a .ZIP file as your Module 3 Homework Assignment.
Write a 2 page research paper (excluding the title page) on logical, circular, and arithmetic shift operations. Use an example not discussed in the textbook to explain these shift operations. In addition to textbook, use two other resources (Wikipedia sources are not permitted) and list each resource used at the end of paper in the reference list section. Please remember that you may utilize the LIRN Library to help you search for ...view middle of the document...
Therefore, the shift operations can be denoted by either multiplication (for left shift) or division (for right shift) of the contents of the register by 2. The above statements present a summarized crux for shift operations.
There are three different types of shift operations: Logical shift operation, circular shift operation (also called as rotation) and arithmetic shift operations.
In the logical shift operation, zeros are shifted in to replace the discarded bits. It is the same as the arithmetic shift but is not applied to a signed number because these shifts can possibly alter the sign of the number which is essentially defined by the leftmost bit in the pattern.
For example, logical left shift on a bit pattern 10011000 can be done as below:
An arithmetic shift operation is very similar to logical shifts, but in a way that the correct sign of a two's complement value is preserved. Arithmetic right shift is equivalent to dividing an integer by two, while arithmetic left shift is equal to multiplying an integer by two.
For example, arithmetic right shift on bit pattern 10011001 is shown below. The original number -103 gets changed to -52 which is -103 divided by 2. On dividing the number in the figure above by 2, the sign should not change, thus the sign remains the same during a right shift. Also, in sign-magnitude notation, a 0 must be shifted into the last bit.
Yet another type of shift operation is rotation or circular shift. In this operation, the bits from the bit pattern are rotated considering that the left and the right ends of the registered are joined. The value that is shifted in on the right during a left-shift is whatever value was shifted out on the left, and vice versa. This operation is widely used in cryptographic algorithms.
For example, the figures below give examples of left circular shift and right circular shift:
1. "Synthesizing arithmetic operations using bit-shifting tricks". Bisqwit.iki.fi. 2014-02-15. Retrieved 2014-03-08.
2. "Operator (C# Reference)". Microsoft. Retrieved 14 July 2013.
3. "Shift micro operations and examples". Available from: