With a logical shift the vacated bits are always filled with zeroes. With an arithmetic shift, a left shift will fill vacated bits with zeroes but a right shift fills the vacated bits with a copy of the most significant bit.
hardware,software and 3rd is data. explain in detail then this question will be completed.
All arithmetic, logical operators are operators in c tokens. As: +, - , ++, --, %, &&, &, >>, << etc.
The different types of operators are: Assignment operator- This is used to assign values to variables. Ex: = Arithmetic Operators - These are used to perform arithmetic operations. Ex: +, -, *, /, % Logical Operators - These are used to perform logical checks like: I < 10 or x == Y etc.
arithmatic operator +,-,*,/,% assigment oprator == logical operator &,|,^,&&,,! bitwise opertor &,|,^ left shift << right shift >> left shift zero fill << assignment operator +=,-=,*=,/=
A logical shift moves bits left or right. After a left shift, the high-order bit is lost while a zero is inserted in the low-order bit. After a right-shift, the low-order bit is lost and a zero inserted in the high-order bit. The left (<<) and right (>>) shift operators are binary operators; the first operand is the value being shifted, the second operand is the number of bit positions to shift. Thus x << y will left shifts all the bits of x by y bit positions.
Instead of being filled with all 0s, as in logical shift, when shifting to the right, the leftmost bit (usually the sign bit in signed integer representations) is replicated to fill in all the vacant positions (this is a kind of sign extension).
ARITHMETIC AND LOGICAL UNIT Anand bhat(mca@kiit-870024)
Arithmetic logic unit
The unit that performs the arithmetic and logical operations within the processor is called the Arithmetic Logic Unit (ALU).
An arithmetic operation combines two numbers while a logical operation uses two logical values which can be true or false. The arithmetic operation uses adding or subtraction to reach the correct answer.
The Arithmetic Logic Unit (ALU) is the heart of a CPU. This is what allows the computer to add, subtract, and to perform basic logical operations.
ALU
logic unit
ACCUMULATOR
Arithmetic and logical
Arithmetic operations act on the values of numbers or expressions. Logical operations act on the truth-values of statements or equations.
The Arithmetic Logic Unit as suggested by the name carries out the arithmetic calculations of the computer.