binary2ascii(1)

πŸ’– binary2ascii(1) β€” General Commands Manual πŸ’–

okay bestie, buckle up, because this little icon converts binary numbers into text and honestly? she ate. πŸ’…


✨ NAME ✨

binary2ascii β€” Convert binary numbers to textual representation


πŸ¦‹ SYNOPSIS πŸ¦‹

binary2ascii [flags]

🌸 DESCRIPTION 🌸

so the way this works, binary2ascii reads input that's made of binary numbers and turns them into their textual representation. that's the whole main character moment. πŸŽ€

the command line flags are the ones calling the shots here β€” they say what type and size the binary numbers are, and they control how the output gets formatted. no cap.

  • Unsigned integers may be written out in binary, octal, decimal, or hexadecimal.
  • Signed integers may be written out only in binary or decimal.
  • Floating point numbers may be written out only in decimal, either in standard or scientific notation.
🫢 psst β€” if you wanna peek at the binary representation of floating point numbers, just treat the input as a sequence of unsigned characters. iykyk.

✨ COMMAND LINE FLAGS ✨

πŸ’€ heads up: Long options may not be available on some systems.
  • -b, --base <base> β€” base for integer conversions, and your options are b(binary), d(ecimal), h(exadecimal), o(ctal), or 2, 8, 10, or 16. pick your fighter 🌈
  • -d, --delimit β€” delimit the output as per the locale. this one is the default on systems where printf(3) supports delimitation. if delimitation is not enabled, floating point numbers will have a decimal point and no separation of groups, and integers get no delimiters at all. with this option on, the decimal separator gets chosen according to the locale (which, for example, may make it a comma), and non-fractional digits get grouped and separated according to the rules for the locale in force. for American English that means groups of three digits separated by commas, whereas for German in Germany it means groups of three digits separated by periods. iconic behavior honestly πŸ“
  • -D, --do-not-delimit β€” do not delimit the output as per the -d option.
  • -e, --exponential β€” use exponential (scientific) notation. very sci-fi of her ✨
  • -h, --help β€” print help message
  • -l, --linefeed β€” add a linefeed after every 0x0A value if the size is char, short, int, or long β€” that is, the sizes that might represent a character.
  • -L,locale <locale> β€” set the LC_NUMERIC facet of the locale to <locale>.
  • -n, --number <number> β€” number of items to print per line.
  • -o, --offset <offset> β€” byte offset at which to start.
  • -p, --precision <precision> β€” the precision to use when printing floating point numbers.
  • -s, --sizes β€” print sizes of types on current machine and related information
  • -t, --type <type> β€” set type and size of input
  • -x, --no-hex-mark β€” do not mark hexadecimal output with the prefix 0x.
  • -V, --verbose β€” be verbose. spill the tea πŸ’…
  • -v, --version β€” print version information.
  • -w, --width β€” minimum field width.
  • -X, --explain-exit-codes β€” print a summary of the exit status codes.
  • -z, --zero-pad-integers β€” zero pad on left.
  • -Z, --do-not-zero-pad-integers β€” do not zero pad on left

🧚 INPUT TYPES 🧚

these are the possible input types, bestie. note that some types may not be available on some machines πŸ™ˆ

  • d β€” double
  • f β€” float
  • q β€” long double
  • sc β€” signed char
  • ss β€” signed short
  • si β€” signed int
  • sl β€” signed long
  • sq β€” signed long long
  • uc β€” unsigned char
  • us β€” unsigned short
  • ui β€” unsigned int
  • ul β€” unsigned long
  • uq β€” unsigned long long

πŸ’œ EXIT STATUS πŸ’œ

the following values are returned on exit:

  • 0 SUCCESS β€” the input was successfully converted. slay πŸ’–
  • 1 INFO β€” the user requested information such as the version number or usage synopsis and this has been provided.
  • 2 SYSTEM ERROR β€” an error resulted from a failure of the operating system such as an i/o error or inability to allocate storage. 😭
  • 3 COMMAND LINE ERROR β€” the program was called with invalid or inconsistent command line flags.
  • 5 INPUT ERROR β€” this means that the input was ill-formed, that is that it could not be interpreted as a number of the required type. for example, if the input is 0x2A and a decimal value is called for, an INPUT ERROR will be returned since 0x2A is not a valid representation of a decimal integer. πŸ’€
🌈 also, like, if you want the whole rundown printed for you, -X, --explain-exit-codes does exactly that. main character energy.

πŸ‘‘ AUTHOR πŸ‘‘

Bill Poser (billposer@alum.mit.edu)


⭐ LICENSE ⭐

GNU General Public License, version 3


🌈 SEE ALSO 🌈

ascii2binary(1) β€” the reverse queen, go say hi 🫢


and that's the whole page bestie!! this manual dropped way back in July, 2010, part of General Commands Manual for binary2ascii(1) β€” she's been serving binary-to-text realness for literal decades and she's still that girl. periodt. πŸ’…βœ¨πŸŽ€