Assembly Language Programming Tutorial – 48 – SAR Instruction

All references in this video came from:
Assembly Language for x86 Processors (6th Edition)

Brought to you by

The Rasmurtech Community:

Rasim from give us another tutorial on Assembly Language Programming . In this tutorial Rasim shows us how to use the SAR Instruction.



Binary to Decimal to Hexadecimal Converter:


Wiki Answsers: Explain 8086 flag register

Google Plus:





Jimmy King says:

Don’t u know the difference between SAR & SHR ??!!

gidgnulur says:


Rasim Muratovic says:

#programming   #programminglanguage   #coding  

Abuzar Ghafari says:

mov al,0F0h ; AL = 11110000b (-16)
sar al,1 ; AL = 11111000b (-8), CF = 0
you did’t tell any thing about the sign in sar. it conservers it sign after sar instruction.

Aqdar Alessai says:

thank u for the video,
But actually SHR Instruction is not identical to SAR
SAR shifts each bit to the right and copies the sign bit, so if we have ax= 1110 0011 and count of 3 then ax = 1111 1100 means we’ll insert the sign 3 times which is 1 and remove the first 3 bits.

James Wood says:

0xFF(-1) => SHR by 1 => 0x7F(127) — sign changed
0xFF(-1) => SAR by 1 => 0xFF(-1) — sign not changed

 Write a comment


Do you like our videos?
Do you want to see more like that?

Please click below to support us on Facebook!