Barcode scanning with binary code