0
37kviews
Write 8086 assembly language program to count number of 0's and 1's in a given 8 bit number.
1 Answer
4
4.3kviews

Program:

Data segment.

NUM DB 564

ZEROS DB ?

ONES DB ?

Data ENDS

CODE SEGMENT

ASSUME CS : CODE, DS : DATA

START :

MOV AX, DATA

MOV . DS, AX ; Initialize Data Segment

MOV AL, NUM ; Get number into Accumulator

MOV BL, 00H ; initially ZERO …

Create a free account to keep reading this post.

and 3 others joined a min ago.

Please log in to add an answer.