Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

what is the difference between arithmetic shift and logical?

Status
Not open for further replies.

coder

Newbie level 1
Joined
Jan 19, 2006
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,287
difference between logical and arithmetic shift

what is the difference between arithmetic shift and logical shift?

What is the advantage and disadvantage concerned to both?
Does anybody know?
 

banh

Advanced Member level 1
Joined
Dec 16, 2004
Messages
458
Helped
17
Reputation
34
Reaction score
5
Trophy points
1,298
Activity points
3,939
difference between arithmetic and logical shift

logical shift: 0 is shifted in
arithmetic shift: the sign is preserved
 

arunragavan

Advanced Member level 1
Joined
Jul 1, 2004
Messages
417
Helped
30
Reputation
60
Reaction score
9
Trophy points
1,298
Location
India
Activity points
5,030
arithmetic shift and logical shift

do you mean the << or >> shiftin?

yes absolutly .. like logical shift, shifts the number of bits..but arithmetic -> as such does it with sign preservation..

like 7>>3 means .. 7*2^3 = 56.
7<<3 = 7/(2^3) = 1;

this is how its done as far as i am concern.

with regards,
arun
 
Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top