What is a carriage return? About computer character codes

Explanation of IT Terms

What is a Carriage Return?

A carriage return is a control character used in computer systems and typewriters to return the cursor or print head to the beginning of a new line. It is represented by the ASCII code 13 or the Unicode character U+000D. The concept of a carriage return originated from mechanical typewriters, where a physical carriage (the moving part of the typewriter) had to be returned to the beginning of a line.

In modern computer systems, a carriage return is used together with a line feed character (ASCII code 10 or Unicode character U+000A) to indicate the end of a line. This combination, known as a “newline” or “line break,” is used to separate lines of text in files and documents. When a carriage return and line feed are used together, it is represented as ASCII code 13 followed by ASCII code 10.

Carriage returns have different effects depending on the operating system and text editor being used. In Windows systems, including Windows-based text editors, such as Notepad, a carriage return and line feed sequence is usually used. In Unix-based systems, such as Linux or macOS, only a line feed character is used.

Usage in Computer Character Codes

In computer character codes, a carriage return is represented by different codes depending on the standard being used:

  • ASCII: Carriage return is represented by code 13 (decimal) or 0x0D (hexadecimal).
  • Unicode: Carriage return is represented by character U+000D.

It is important to consider the character codes correctly when processing text files or developing software that deals with text manipulation.

Carriage returns also play a crucial role in text formatting and word processing. They are used to indicate the end of a line and the start of a new one, allowing text to be organized in paragraphs and other structured formats.

In conclusion, a carriage return is a control character used to indicate the beginning of a new line in computer systems. It originated from mechanical typewriters and is now a fundamental part of text processing and formatting.

Reference Articles

Reference Articles

Read also

[Google Chrome] The definitive solution for right-click translations that no longer come up.