def pad_binary_digits(bin_octet):
 while True:
  if (len(bin_octet) >= 8):
   break
  bin_octet = ('0' + bin_octet)
 return bin_octet

def pad_binary_digits ( bin_octet ) : while True : if ( len ( bin_octet ) >= 8 ) : break bin_octet = ( '0' + bin_octet ) return bin_octet
pad the binary number to eight digits .