Help for this page

Select Code to Download


  1. or download this
    
    use warnings;
    ...
            print "0";
        }
    }
    
  2. or download this
    
    use warnings;
    ...
            print "0";
        }
    }
    
  3. or download this
    
    use strict;
    ...
        die "Sorry, value $value isn't in the table!\n";
    }
    print "Decimal $value = Binary $binary\n";
    
  4. or download this
    use warnings;
    use strict;
    ...
    chomp (my $value = <STDIN>);
    print map { ($value & (1 << (7 - $_)))? 1: 0 } ( 0 .. 7 );
    print "\n";