Free Electronic Circuits & 8085 projects

Electronic projects with circuit diagram and 8085 microprocessor projects.

Right shift, bit of data( 8 bit and 16 bit)

Published on Nov 16 2009 // Learners


Statement: Write a program to shift an eight bit data four bits right. Assume data is in register C.

Sample problem:

(4200H) = 58

Result = (4300H) = 08 and

    (4301H) = 05

Source program 1:

  • MOV A, C
  • RAR
  • RAR
  • RAR
  • RAR
  • MOV C, A
  • HLT

Flowchart for Source program1

13.a - - Right shift bit of data

Statement: Write a program to shift a 16 bit data, 1 bit right. Assume that data is in BC register pair.

Source program 2

  • MOV A, B
  • RAR
  • MOV B, A
  • MOV A, C
  • RAR
  • MOV C, A
  • HLT

Flowchart for Source program1

13.b - - Right shift bit of data

Related Programs for Beginners: (Click down)

Store 8-bit data in memory

Add two 16-bit numbers

Finding Two’s complement of a number

Exchange the contents of memory locations

Pack-the-unpacked-BCD-numbers