Binary to grey code conversion

;PROGRAM TO CONVERT 8-BIT BINARY NUMBER TO ITS GRAY CODE FORM

data segment

opr db 34h

res db ?

data ends

code segment

assume cs:code,ds:data

start:

mov ax,data

mov ds,ax

mov al,opr

mov bl,al

rcr al,1

xor al,bl

mov res,bl

int 3

code ends

end start

No comments:

Post a Comment