Hi. I've created a small program where the user inputs 8 bits and those bits are stored in order of input into an array. Here is a code fragment of my program that deals with this array...

Code:
start:
mov CX,0
mov bx, offset array

arr_input:
inc bx;
mov   ah, 01h   ; keyboard input subprogram
int   21h    ; read character into al
mov [bx], al

looper:
inc CX
cmp CX, 7
jle arr_input
Now I'd like to see how many times the first two bits are repeated in the byte. For example if the first two characters are 11 then in the byte 11001101, the answer is 2...

Can anybody provide some tips or sample code on how this could be done? Thanks.