binary number logic high = 5 v. ,Logic low = 0 v(ground) ,which LED is bright up when logic high. according to table one A=2 , B=2 it gonna be A=1 B=2 it mean if you switch input than and output with appear a digit. but each digit need to switch input correctly. example digit 3 you switch