use warnings; use strict; print "Enter decimal number less than 256:"; my $decimal; $decimal=; chomp $decimal; printf '%08b', $decimal; print "\n";