BIN:	MVI	B,0		; ANSWER := 0;
BINLOOP:CALL	GET		; A := INPUT [character];
	CPI	'0'		; is A LT '0'?
	RC			; if so then return;
	CPI	'2'		; is A LT '2'?
	RNC 			; if not then return;
	RAR			; CARRY := A0;
	MOV	A,B		; A := ANSWER;
	RAL			; rotate carry into A;
	RC			; overflow: if CARRY = 1 then return;
	MOV	B,A		; ANSWER := A;
	JMP	BINLOOP		; reiterate for next bit;

