Toolman

ASCII 4

ASCII 4 is End of Transmission — the control character EOT.

Every representation

CharacterEOT (not printable)
NameEnd of Transmission
Decimal4
Hexadecimal0x04
Octal0004
Binary00000100
HTML entity
Escape sequence\x04
UnicodeU+0004
KeyboardCtrl+D
GroupControl character

What it is for

Ended a transmission entirely. On a Unix terminal this is what Ctrl+D sends, which is why Ctrl+D at an empty prompt closes the shell: it signals end-of-file on the input.

Where the number comes from

Codes 0 to 31 were reserved for control: instructions to a teleprinter rather than characters to print. Code 4 is Ctrl+D because the Ctrl key was originally wired to clear the top two bits of whatever you typed, mapping the letter D at 68 down to 4.

Frequently asked questions

What is ASCII 4?

End of Transmission (EOT), a control character. In hexadecimal it is 0x04, in octal 0004, and in binary 00000100.

How do I type ASCII 4?

Press Ctrl+D in a terminal. In a string literal you can write it as \\x04 in most languages.

Is ASCII 4 printable?

No. Codes 0 to 31 and 127 are control characters — they were instructions to a teleprinter rather than marks on paper, and most terminals show nothing for them.

Nearby codes

Full ASCII table · Text to binary converter · Number base converter