-
Notifications
You must be signed in to change notification settings - Fork 1
/
ascii.hpp
683 lines (404 loc) · 53.6 KB
/
ascii.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
#ifndef __ASCII_H
#define __ASCII_H
/*
- ASCII:
- ASCII (American Standard Code for Information Interchange) is a character encoding standard that assigns numerical values to various characters, symbols, and control codes used in computers and communication systems.
- In ASCII, each character is represented by a unique 7-bit binary number, which corresponds to a decimal value between 0 and 127.
- For example, let's take the lowercase letter "a". In ASCII, the decimal value assigned to "a" is 97. This value is represented in binary as 01100001.
- Here's a step-by-step breakdown:
1. **Decimal Value:** The ASCII value for "a" is 97.
2. **Binary Representation:** Convert 97 to binary. The binary representation of 97 is 1100001.
3. **Padding:** Since ASCII uses 7 bits, we need to pad the binary value with a leading zero. The padded binary value becomes 01100001.
- So, the ASCII representation of the lowercase letter "a" is 01100001.
- Here are a few more examples:
- The ASCII value for the uppercase letter "A" is 65, which in binary is 01000001.
- The ASCII value for the digit "0" is 48, which in binary is 00110000.
- The ASCII value for the space character is 32, which in binary is 00100000.
- The ASCII value for the exclamation mark "!" is 33, which in binary is 00100001.
- You can find complete ASCII tables online that list the decimal, binary, and corresponding characters for all ASCII values.
- This character encoding is foundational for text-based communication and representation in computers and programming.
- ASCII Table:
- Here's a comprehensive table listing all ASCII characters, including both printable and control characters.
- The table includes their decimal values, binary representations, characters themselves (if printable), and brief descriptions:
-----------------------------------------------------------------------------------
| Decimal | Binary | Character | Description |
| ------- | -------- | --------- | -----------------------------------------------|
| 0 | 00000000 | NUL | Null character |
| 1 | 00000001 | SOH | Start of Header |
| 2 | 00000010 | STX | Start of Text |
| 3 | 00000011 | ETX | End of Text |
| 4 | 00000100 | EOT | End of Transmission |
| 5 | 00000101 | ENQ | Enquiry |
| 6 | 00000110 | ACK | Acknowledgment |
| 7 | 00000111 | BEL | Bell (Alarm) |
| 8 | 00001000 | BS | Backspace |
| 9 | 00001001 | HT | Horizontal Tab |
| 10 | 00001010 | LF | Line Feed (New Line) |
| 11 | 00001011 | VT | Vertical Tab |
| 12 | 00001100 | FF | Form Feed (New Page) |
| 13 | 00001101 | CR | Carriage Return |
| 14 | 00001110 | SO | Shift Out (Start of G1 Character Set) |
| 15 | 00001111 | SI | Shift In (Start of G0 Character Set) |
| 16 | 00010000 | DLE | Data Link Escape |
| 17 | 00010001 | DC1 | Device Control 1 (XON) |
| 18 | 00010010 | DC2 | Device Control 2 |
| 19 | 00010011 | DC3 | Device Control 3 (XOFF) |
| 20 | 00010100 | DC4 | Device Control 4 |
| 21 | 00010101 | NAK | Negative Acknowledgment |
| 22 | 00010110 | SYN | Synchronous Idle |
| 23 | 00010111 | ETB | End of Transmission Block |
| 24 | 00011000 | CAN | Cancel |
| 25 | 00011001 | EM | End of Medium |
| 26 | 00011010 | SUB | Substitute |
| 27 | 00011011 | ESC | Escape |
| 28 | 00011100 | FS | File Separator |
| 29 | 00011101 | GS | Group Separator |
| 30 | 00011110 | RS | Record Separator |
| 31 | 00011111 | US | Unit Separator |
| 32 | 00100000 | (space) | Space |
| 33 | 00100001 | ! | Exclamation Mark |
| ... | ... | ... | ... |
| 126 | 01111110 | ~ | Tilde |
| 127 | 01111111 | (DEL) | Delete (Not a standard ASCII character) |
-----------------------------------------------------------------------------------
- Please note that the printable characters from decimal value 33 to 126 correspond to the standard ASCII characters that are commonly used for text representation and communication.
- The table also includes the control characters from decimal value 0 to 31 and the special "Delete" character (not a standard ASCII character) with decimal value 127.
- ASCII Code (Code Point):
NUL (null)
In ASCII (American Standard Code for Information Interchange), the decimal value for the "NUL" (Null) control character is 0. The "NUL" character is a non-printable control character that represents the absence of a character or a null value.
Here's the information about the "NUL" control character in ASCII:
- **Decimal Value:** 0
- **Binary Representation:** 00000000
- **Character:** The "NUL" control character doesn't have a visible graphical representation like letters or symbols. It's used to indicate the end of a string or to represent a null value in various programming contexts.
In programming and data processing, the "NUL" control character is often used as a terminator for strings in C-style strings (null-terminated strings), where the character marks the end of the string data. It is also used in various other contexts where the absence of data or a placeholder is needed.
Because the "NUL" character is non-printable, it doesn't result in any visible character on the screen. Instead, it serves as a control character with specific meanings in various applications and programming scenarios.
---
SOH
In ASCII (American Standard Code for Information Interchange), the decimal value for the "SOH" (Start of Header) control character is 1. The "SOH" character is a non-printable control character used to indicate the beginning of a header section in data communication.
Here's the information about the "SOH" control character in ASCII:
- **Decimal Value:** 1
- **Binary Representation:** 00000001
- **Character:** Like other control characters, the "SOH" control character doesn't have a visible graphical representation like letters or symbols. It's used for signaling and doesn't result in any visible character on the screen.
In communication protocols, the "SOH" control character is often used to mark the start of a header section in data packets. It's used to indicate that the following data contains control information or metadata about the transmitted data. The "SOH" control character helps receivers identify the structure of the data and interpret it correctly.
The "SOH" character is particularly important in scenarios where data is divided into sections with specific purposes, such as framing data in networking or file formats. It's one of several control characters used to manage the flow and interpretation of data in various communication and data processing contexts.
---
STX (start of text)
In ASCII (American Standard Code for Information Interchange), the decimal value for the "STX" (Start of Text) control character is 2. The "STX" character is a non-printable control character used to indicate the start of a text section in data communication.
Here's the information about the "STX" control character in ASCII:
- **Decimal Value:** 2
- **Binary Representation:** 00000010
- **Character:** The "STX" control character doesn't have a visible graphical representation like letters or symbols. It's used for signaling and doesn't result in any visible character on the screen.
In communication protocols, the "STX" control character is often used to mark the start of a text section in data packets. Similar to the "SOH" character (Start of Header), "STX" helps define the structure of transmitted data and allows receivers to correctly interpret and process the content that follows.
Just as with other control characters, "STX" is essential for managing the flow and interpretation of data in various communication and data processing scenarios, especially when data is divided into distinct sections or frames. It plays a crucial role in maintaining data integrity and facilitating the exchange of information between devices and systems.
---
ETX (end of text)
In ASCII (American Standard Code for Information Interchange), the decimal value for the "ETX" (End of Text) control character is 3. The "ETX" character is a non-printable control character used to indicate the end of a text section in data communication.
Here's the information about the "ETX" control character in ASCII:
- **Decimal Value:** 3
- **Binary Representation:** 00000011
- **Character:** Like other control characters, the "ETX" control character doesn't have a visible graphical representation like letters or symbols. It's used for signaling and doesn't result in any visible character on the screen.
In communication protocols, the "ETX" control character is often used to mark the end of a text section in data packets. It signifies the completion of the textual content and may be followed by additional control characters or data related to the transmission.
Just as "STX" (Start of Text) indicates the beginning of a text section, "ETX" marks the end, helping receivers correctly interpret and process the transmitted content. Both "STX" and "ETX" are essential for managing the structure and flow of data in various communication and data processing scenarios, ensuring accurate data exchange between devices and systems.
---
EOT (end of transmission)
In ASCII (American Standard Code for Information Interchange), the decimal value for the "EOT" (End of Transmission) control character is 4. The "EOT" character is a non-printable control character used to indicate the end of a transmission or communication session.
Here's the information about the "EOT" control character in ASCII:
- **Decimal Value:** 4
- **Binary Representation:** 00000100
- **Character:** Like other control characters, the "EOT" control character doesn't have a visible graphical representation like letters or symbols. It's used for signaling and doesn't result in any visible character on the screen.
In communication protocols, the "EOT" control character is often used to signify the end of a transmission or communication session. When sent, it indicates to the receiving device that the data transmission is complete and that the communication session can be terminated.
The "EOT" character is particularly useful in scenarios where data is being transmitted in blocks or segments, such as in file transfers or data exchange protocols. It helps ensure that both sender and receiver are aware when the data exchange is complete and when it's appropriate to close the communication connection.
Similar to other control characters like "STX" and "ETX," "EOT" is an integral part of managing the structure and flow of data in communication protocols, contributing to accurate and reliable data exchange between devices and systems.
---
ENQ (enquiry)
In ASCII (American Standard Code for Information Interchange), the decimal value for the "ENQ" (Enquiry) control character is 5. The "ENQ" character is a non-printable control character used to initiate a request for information or data in communication protocols.
Here's the information about the "ENQ" control character in ASCII:
- **Decimal Value:** 5
- **Binary Representation:** 00000101
- **Character:** The "ENQ" control character doesn't have a visible graphical representation like letters or symbols. It's used for signaling and doesn't result in any visible character on the screen.
In communication protocols, the "ENQ" control character is often used to initiate a request for data or information from another device or system. When a device receives an "ENQ," it's expected to respond with relevant information or data, completing the communication exchange.
The "ENQ" character is useful in scenarios where one device needs to inquire about the status, capabilities, or information held by another device. It serves as a way to establish communication and request specific data before proceeding with the exchange.
While the "ENQ" control character might not be as commonly used as some other control characters, it's still an important component of certain communication protocols where information exchange and interaction between devices are required.
---
ACK (acknowledge)
"ACK" stands for "Acknowledgment." In ASCII (American Standard Code for Information Interchange), the decimal value for the "ACK" control character is 6. The "ACK" character is a non-printable control character used to indicate the acknowledgment or successful receipt of data in communication protocols.
Here's the information about the "ACK" control character in ASCII:
- **Decimal Value:** 6
- **Binary Representation:** 00000110
- **Character:** The "ACK" control character doesn't have a visible graphical representation like letters or symbols. It's used for signaling and doesn't result in any visible character on the screen.
In communication protocols, when a device receives data successfully, it can respond with an "ACK" control character to indicate that the data was received without error and can be considered valid. The sender of the data then knows that the transmission was successful and can proceed with additional communication or actions.
The "ACK" character is an essential component of reliable data exchange in various networking and communication scenarios, helping to ensure that transmitted data is accurately received and processed.
---
BEL (bell)
In ASCII (American Standard Code for Information Interchange), the decimal value for the "BEL" (Bell) control character is 7. The "BEL" character is a non-printable control character that historically produced an audible sound, often represented as a "bell" sound.
Here's the information about the "BEL" control character in ASCII:
- **Decimal Value:** 7
- **Binary Representation:** 00000111
- **Character:** The "BEL" control character doesn't have a visible graphical representation like letters or symbols. Historically, it was used to produce an audible alert or notification, such as a ringing sound.
In the context of modern computing, the "BEL" control character is often used to indicate an alert or notification in text-based environments. While it doesn't produce an audible sound on most modern systems, it can trigger visual or other types of notifications.
For example, in some terminal emulators or command-line interfaces, sending the "BEL" character might cause the screen to flash or display a special symbol to indicate an alert. Additionally, the "BEL" character can be used in text processing to signal certain conditions or actions within a program.
While the original audible effect of the "BEL" control character is less relevant in modern computing, it still serves as a way to convey attention or signal special situations within text-based environments.
---
BS (backspace)
In ASCII (American Standard Code for Information Interchange), the decimal value for the "BS" (Backspace) control character is 8. The "BS" character is a non-printable control character used to move the cursor or printing position one space backward.
Here's the information about the "BS" control character in ASCII:
- **Decimal Value:** 8
- **Binary Representation:** 00001000
- **Character:** The "BS" control character doesn't have a visible graphical representation like letters or symbols. It's used to indicate that the printing or cursor position should move one space backward.
In the context of text processing and output, the "BS" control character is used to correct errors or modify previously printed text. When the "BS" character is encountered, the cursor or printing position moves back one space, allowing subsequent characters to overwrite the content that was printed earlier.
For example, consider the scenario where the text "Hello, world!" has been printed, and then the "BS" character is encountered followed by a comma. The result would be "Hello, world,!" because the "BS" character moved the cursor back, allowing the comma to overwrite the space after "world."
While the use of the "BS" character is less common in modern graphical user interfaces, it still finds application in certain text-based environments, including terminal emulators, command-line interfaces, and text editors.
---
HT (horizontal tab)
In ASCII (American Standard Code for Information Interchange), the decimal value for the "HT" (Horizontal Tab) control character is 9. The "HT" character is a non-printable control character used to move the cursor or printing position to the next horizontal tab stop.
Here's the information about the "HT" control character in ASCII:
- **Decimal Value:** 9
- **Binary Representation:** 00001001
- **Character:** The "HT" control character doesn't have a visible graphical representation like letters or symbols. It's used to indicate that the cursor or printing position should move to the next horizontal tab stop.
In the context of text processing and formatting, the "HT" control character is used to align text or data in columns. When the "HT" character is encountered, the cursor or printing position moves to the next predefined horizontal position, often determined by tab stops.
For example, in a tabular format, you might use the "HT" character to separate columns of data. Each "HT" character moves the cursor to the next predefined position, allowing you to align data consistently within columns.
While the use of the "HT" character is less common in modern word processing and graphical interfaces, it still plays a role in certain text-based environments, including code editors, terminal emulators, and command-line interfaces. It provides a way to achieve consistent alignment and formatting of text and data.
---
LF (line feed/new line)
In ASCII (American Standard Code for Information Interchange), the decimal value for the "LF" (Line Feed) control character is 10. The "LF" character is a non-printable control character used to move the cursor or printing position to the next line.
Here's the information about the "LF" control character in ASCII:
- **Decimal Value:** 10
- **Binary Representation:** 00001010
- **Character:** The "LF" control character doesn't have a visible graphical representation like letters or symbols. It's used to indicate that the cursor or printing position should move to the next line.
In text processing and output, the "LF" control character is used to start a new line. When encountered, the cursor or printing position moves to the beginning of the next line, allowing subsequent text to be written on a new line.
For example, consider the text:
```
Hello, world!
```
If a "LF" character is encountered after "Hello, world!", the next text will start on a new line:
```
Hello, world!
Next line.
```
The "LF" character is an important part of text-based environments, including terminal emulators, command-line interfaces, and text editors, where it's used to control line breaks and achieve proper formatting. It's also one of the characters used in the combination "\r\n" (carriage return followed by line feed) to represent the end of a line in certain operating systems and protocols.
---
VT (vertical tab)
In ASCII (American Standard Code for Information Interchange), the decimal value for the "VT" (Vertical Tab) control character is 11. The "VT" character is a non-printable control character used to move the cursor or printing position to the next vertical tab stop.
Here's the information about the "VT" control character in ASCII:
- **Decimal Value:** 11
- **Binary Representation:** 00001011
- **Character:** The "VT" control character doesn't have a visible graphical representation like letters or symbols. It's used to indicate that the cursor or printing position should move to the next vertical tab stop.
The "VT" control character is less commonly used than characters like "LF" (Line Feed) and "CR" (Carriage Return) but serves a similar purpose in text formatting. It's used to achieve vertical alignment or positioning in certain text-based environments.
While the use of the "VT" character might not be as prevalent in modern computing as it once was, it can still find application in specific contexts such as code editors, text manipulation programs, and certain legacy systems where precise text layout and formatting are important.
---
FF (form feed / new page)
In ASCII (American Standard Code for Information Interchange), the decimal value for the "FF" (Form Feed) control character is 12. The "FF" character is a non-printable control character used to advance the printing or display position to the start of the next page or form.
Here's the information about the "FF" control character in ASCII:
- **Decimal Value:** 12
- **Binary Representation:** 00001100
- **Character:** The "FF" control character doesn't have a visible graphical representation like letters or symbols. It's used to indicate that the printing or display position should move to the beginning of the next page or form.
The "FF" control character is used primarily for controlling printed output on printers, plotters, and other devices. When encountered, it instructs the device to eject the current page and start printing from the beginning of the next page or form.
While the use of the "FF" character is less common in modern computer systems and graphical interfaces, it can still be relevant in specific contexts such as text formatting for printers and legacy systems that rely on page-oriented output. It's part of the set of control characters that enable various formatting and control features in text-based environments.
---
CR (carriage return)
In ASCII (American Standard Code for Information Interchange), the decimal value for the "CR" (Carriage Return) control character is 13. The "CR" character is a non-printable control character used to move the cursor or printing position to the beginning of the current line.
Here's the information about the "CR" control character in ASCII:
- **Decimal Value:** 13
- **Binary Representation:** 00001101
- **Character:** The "CR" control character doesn't have a visible graphical representation like letters or symbols. It's used to indicate that the cursor or printing position should move to the beginning of the current line.
In text processing and output, the "CR" control character is used to return the cursor or printing position to the beginning of the line without advancing to the next line. This behavior allows subsequent characters to overwrite the content that was previously printed on the same line.
For example, consider the text:
```
Hello, world!
```
If a "CR" character is encountered after "Hello, world!", the next text will overwrite the existing text on the same line:
```
Next line, world!
```
The "CR" character is an important part of text-based environments, including terminal emulators, command-line interfaces, and text editors, where it's used to control the cursor's position within a line and achieve proper formatting. It's also one of the characters used in the combination "\r\n" (carriage return followed by line feed) to represent the end of a line in certain operating systems and protocols.
---
SO (shift out)
In ASCII (American Standard Code for Information Interchange), the decimal value for the "SO" (Shift Out) control character is 14. The "SO" character is a non-printable control character used to switch to an alternate character set or mode.
Here's the information about the "SO" control character in ASCII:
- **Decimal Value:** 14
- **Binary Representation:** 00001110
- **Character:** The "SO" control character doesn't have a visible graphical representation like letters or symbols. It's used to signal a switch to an alternate character set.
The "SO" control character is part of a pair of control characters used for shifting between two character sets, often called "G0" and "G1." The "SO" character switches to the "G1" character set, which can include different symbols, graphics, or special characters.
The "SI" (Shift In) control character, with decimal value 15, is used to switch back to the default "G0" character set.
The use of "SO" and "SI" control characters is more relevant in older text-based environments and legacy systems where character sets and text modes were more prevalent. In modern computing, especially in graphical user interfaces, the need for manually switching character sets is much less common.
---
SI (shift in)
In ASCII (American Standard Code for Information Interchange), the decimal value for the "SI" (Shift In) control character is 15. The "SI" character is a non-printable control character used to switch back to the default character set or mode.
Here's the information about the "SI" control character in ASCII:
- **Decimal Value:** 15
- **Binary Representation:** 00001111
- **Character:** The "SI" control character doesn't have a visible graphical representation like letters or symbols. It's used to signal a switch back to the default character set.
The "SI" control character is part of a pair of control characters used for shifting between two character sets, often called "G0" and "G1." The "SI" character switches back to the default "G0" character set, which typically includes the standard printable ASCII characters.
The "SO" (Shift Out) control character, with decimal value 14, is used to switch to the alternate "G1" character set.
The use of "SI" and "SO" control characters is more relevant in older text-based environments and legacy systems where character sets and text modes were more prevalent. In modern computing, especially in graphical user interfaces, the need for manually switching character sets is much less common.
---
DLE (data link escape)
In ASCII (American Standard Code for Information Interchange), the decimal value for the "DLE" (Data Link Escape) control character is 16. The "DLE" character is a non-printable control character used to indicate the start of a control sequence in data communication.
Here's the information about the "DLE" control character in ASCII:
- **Decimal Value:** 16
- **Binary Representation:** 00010000
- **Character:** The "DLE" control character doesn't have a visible graphical representation like letters or symbols. It's used to signal the start of a control sequence.
In data communication, the "DLE" control character is used to indicate the beginning of a special control sequence or command. This control sequence might be used for various purposes, such as signaling a specific action, indicating that the following data should be interpreted in a special way, or initiating a specific protocol behavior.
The "DLE" character is often used in combination with other control characters or data to create structured communication protocols. It's part of the set of control characters that allow devices and systems to communicate and exchange data reliably and with defined behaviors.
The exact usage and interpretation of the "DLE" control character depend on the specific communication protocol and context in which it's being used.
---
DC1 (data control 1)
In ASCII (American Standard Code for Information Interchange), the decimal value for the "DC1" (Device Control 1) control character is 17. The "DC1" character is a non-printable control character historically used to control external devices or enable data transmission.
Here's the information about the "DC1" control character in ASCII:
- **Decimal Value:** 17
- **Binary Representation:** 00010001
- **Character:** The "DC1" control character doesn't have a visible graphical representation like letters or symbols. It's used to convey specific control instructions.
The "DC1" control character was originally used to control external devices, often to start the transmission of data or signal a device to resume operation. In some older communication systems, it was used to enable the flow of data from one device to another after a pause.
While the "DC1" character's historical use has decreased with advancements in communication protocols and technology, it serves as an example of how control characters were employed to manage interactions between devices and systems. Modern communication protocols often utilize more complex mechanisms for achieving similar control behaviors.
In the context of modern computing, the "DC1" character's use is less common, and its interpretation can vary based on specific applications or protocols.
---
DC2 (data control 2)
In ASCII (American Standard Code for Information Interchange), the decimal value for the "DC2" (Device Control 2) control character is 18. The "DC2" character is a non-printable control character historically used to control external devices or manage data transmission.
Here's the information about the "DC2" control character in ASCII:
- **Decimal Value:** 18
- **Binary Representation:** 00010010
- **Character:** The "DC2" control character doesn't have a visible graphical representation like letters or symbols. It's used to convey specific control instructions.
The "DC2" control character was originally used to control external devices or manage data transmission in older communication systems. Similar to other control characters, its interpretation and behavior could vary based on the specific context and protocols in which it was used.
Just like the "DC1" control character, the "DC2" character's historical use has decreased with advancements in technology and communication protocols. Modern systems often utilize more sophisticated mechanisms for managing interactions between devices and systems.
In contemporary computing, the "DC2" character's use is less common, and its significance might be specific to certain applications, protocols, or legacy systems.
---
DC3 (data control 3)
In ASCII (American Standard Code for Information Interchange), the decimal value for the "DC3" (Device Control 3) control character is 19. The "DC3" character is a non-printable control character historically used to control external devices or manage data transmission.
Here's the information about the "DC3" control character in ASCII:
- **Decimal Value:** 19
- **Binary Representation:** 00010011
- **Character:** The "DC3" control character doesn't have a visible graphical representation like letters or symbols. It's used to convey specific control instructions.
The "DC3" control character was originally used to control external devices, often to pause or halt data transmission. In older communication systems, sending "DC3" might indicate a request to stop sending data or temporarily suspend the operation of a device.
As with other control characters, the use and interpretation of "DC3" depended on the specific communication protocols and systems in which it was employed. Its significance has diminished with the advancement of technology and more advanced communication methods.
In contemporary computing, the "DC3" character's use is less common, and its meaning might be specific to certain legacy applications, protocols, or specialized systems.
---
DC4 (data control 4)
In ASCII (American Standard Code for Information Interchange), the decimal value for the "DC4" (Device Control 4) control character is 20. The "DC4" character is a non-printable control character historically used to control external devices or manage data transmission.
Here's the information about the "DC4" control character in ASCII:
- **Decimal Value:** 20
- **Binary Representation:** 00010100
- **Character:** The "DC4" control character doesn't have a visible graphical representation like letters or symbols. It's used to convey specific control instructions.
The "DC4" control character was originally used to control external devices or manage data transmission in communication systems. Similar to other control characters, its interpretation and behavior could vary based on the specific context and protocols in which it was used.
As technology and communication protocols advanced, the use of control characters like "DC4" became less common. Modern systems often utilize more sophisticated methods for managing interactions between devices and systems.
In contemporary computing, the "DC4" character's use is rare, and its significance might be specific to certain legacy applications, protocols, or specialized systems.
---
NAK (negative acknowledge)
In ASCII (American Standard Code for Information Interchange), the decimal value for the "NAK" (Negative Acknowledgment) control character is 21. The "NAK" character is a non-printable control character used to indicate the negative acknowledgment of received data or to signal an error condition.
Here's the information about the "NAK" control character in ASCII:
- **Decimal Value:** 21
- **Binary Representation:** 00010101
- **Character:** The "NAK" control character doesn't have a visible graphical representation like letters or symbols. It's used to signal specific conditions or errors.
The "NAK" control character is often used in communication protocols to indicate that there was an issue with the received data or that the data was not successfully processed. When a device or system sends a "NAK," it's conveying that the received data was not valid or that the requested action cannot be performed.
In some protocols, the "NAK" character is used in error detection and correction mechanisms. For example, if a transmitted block of data is corrupted or not received properly, the receiving device might send a "NAK" to request retransmission.
The "NAK" control character plays a role in maintaining data integrity and reliability in various networking and communication scenarios, especially in situations where accurate data exchange is critical.
---
SYN (synchronous idle)
In ASCII (American Standard Code for Information Interchange), the decimal value for the "SYN" (Synchronous Idle) control character is 22. The "SYN" character is a non-printable control character used to indicate a synchronization point in data communication.
Here's the information about the "SYN" control character in ASCII:
- **Decimal Value:** 22
- **Binary Representation:** 00010110
- **Character:** The "SYN" control character doesn't have a visible graphical representation like letters or symbols. It's used to signal synchronization points.
The "SYN" control character is used in communication protocols to establish synchronization between devices or systems. It's often used to indicate a point where data transmission should begin or resume, ensuring that both sender and receiver are in sync.
In some protocols, the "SYN" character can be used to initiate or confirm various actions, such as establishing a connection, confirming readiness for data exchange, or signaling that data transmission should continue after a pause.
The exact usage and interpretation of the "SYN" control character depend on the specific communication protocol and context in which it's being used. It's an important tool for maintaining data consistency and synchronization during communication exchanges.
---
ETB (end of transmission block)
In ASCII (American Standard Code for Information Interchange), the decimal value for the "ETB" (End of Transmission Block) control character is 23. The "ETB" character is a non-printable control character used to indicate the end of a transmission block in certain communication protocols.
Here's the information about the "ETB" control character in ASCII:
- **Decimal Value:** 23
- **Binary Representation:** 00010111
- **Character:** The "ETB" control character doesn't have a visible graphical representation like letters or symbols. It's used to indicate the end of a transmission block.
The "ETB" control character is often used in communication protocols to mark the end of a block of data or a unit of transmission. It can be used to delineate sections of data, especially in scenarios where data is transmitted in discrete blocks or frames.
In some communication protocols, the "ETB" character may be used for error detection and correction, or it may be employed to facilitate framing and synchronization of data between sender and receiver.
The specific use and behavior of the "ETB" control character depend on the communication protocol or system being used. It's part of the set of control characters that help manage data exchange and maintain reliability in various networking and communication scenarios.
---
CAN (cancel)
In ASCII (American Standard Code for Information Interchange), the decimal value for the "CAN" (Cancel) control character is 24. The "CAN" character is a non-printable control character used to cancel or interrupt ongoing processes or communication.
Here's the information about the "CAN" control character in ASCII:
- **Decimal Value:** 24
- **Binary Representation:** 00011000
- **Character:** The "CAN" control character doesn't have a visible graphical representation like letters or symbols. It's used to signal cancellation or interruption.
The "CAN" control character is often used in communication protocols to indicate that a process or transmission should be canceled or interrupted. It can be used to abort ongoing tasks, reset devices, or signal a desire to cease the current operation.
The exact use and interpretation of the "CAN" control character depend on the specific communication protocol, system, or application in which it's being used. It's a versatile tool for managing various scenarios where the need to halt or cancel a process arises.
In modern computing, the "CAN" character's use is less common than some other control characters, but it remains an essential part of certain communication protocols and applications that require the ability to interrupt ongoing activities.
---
EM (end of medium)
In ASCII (American Standard Code for Information Interchange), the decimal value for the "EM" (End of Medium) control character is 25. The "EM" character is a non-printable control character historically used to indicate the end of a medium, such as the end of a data storage device or physical medium.
Here's the information about the "EM" control character in ASCII:
- **Decimal Value:** 25
- **Binary Representation:** 00011001
- **Character:** The "EM" control character doesn't have a visible graphical representation like letters or symbols. It's used to signal the end of a medium.
The "EM" control character was originally used to mark the end of a data storage medium, such as a reel of tape or a physical storage unit. Its purpose was to signal that the current medium was finished and that a new one should be prepared for use.
While the historical context of the "EM" character's use has diminished with advancements in technology, it serves as an example of how control characters were employed to manage interactions between devices and systems. In modern computing, especially in digital systems, the need to explicitly indicate the end of a storage medium is less common, as storage devices and media are more seamlessly managed by operating systems and software.
As a result, the use of the "EM" control character is rare in contemporary computing and might only be relevant in specific legacy applications or systems.
---
SUB (substitute)
In ASCII (American Standard Code for Information Interchange), the decimal value for the "SUB" (Substitute) control character is 26. The "SUB" character is a non-printable control character used to indicate that a character or data should be replaced with another character due to an error or other condition.
Here's the information about the "SUB" control character in ASCII:
- **Decimal Value:** 26
- **Binary Representation:** 00011010
- **Character:** The "SUB" control character doesn't have a visible graphical representation like letters or symbols. It's used to signal the need for substitution.
The "SUB" control character is often used in communication protocols to indicate that a character or data encountered is not valid or cannot be processed as expected. When a device encounters a "SUB," it might replace the invalid data with another character or perform some other error handling action.
For example, if a transmitted block of data contains a character that cannot be properly decoded or interpreted, the receiving device might use the "SUB" character as a placeholder or marker to indicate that substitution is necessary.
The "SUB" control character plays a role in maintaining data integrity and reliability in various networking and communication scenarios, helping to ensure that errors or invalid data are appropriately handled.
---
ESC (escape)
In ASCII (American Standard Code for Information Interchange), the decimal value for the "ESC" (Escape) control character is 27. The "ESC" character is a non-printable control character historically used to initiate various control sequences or commands.
Here's the information about the "ESC" control character in ASCII:
- **Decimal Value:** 27
- **Binary Representation:** 00011011
- **Character:** The "ESC" control character doesn't have a visible graphical representation like letters or symbols. It's used to initiate control sequences.
The "ESC" control character was often used to initiate various escape sequences or commands in older communication systems and devices. These escape sequences could be used to perform specific actions, change modes, or configure certain behaviors of devices or systems.
For example, in text-based terminals, the "ESC" character might be followed by additional characters to instruct the terminal to change text colors, move the cursor, clear the screen, or perform other formatting and control tasks.
While the "ESC" character's use has diminished in modern graphical interfaces and communication protocols, its historical significance demonstrates how control characters were employed to manage various aspects of device behavior and interaction. It's a precursor to more complex and standardized escape sequences used in modern computing.
---
FS (file separator)
In ASCII (American Standard Code for Information Interchange), the decimal value for the "FS" (File Separator) control character is 28. The "FS" character is a non-printable control character historically used to separate data records or files within a stream of data.
Here's the information about the "FS" control character in ASCII:
- **Decimal Value:** 28
- **Binary Representation:** 00011100
- **Character:** The "FS" control character doesn't have a visible graphical representation like letters or symbols. It's used to separate data records or files.
The "FS" control character was often used to indicate the separation of data records or files within a stream of data. It could be employed to help organize and structure data in situations where multiple pieces of information needed to be grouped together.
For example, in some older data storage and communication systems, the "FS" character might be used to mark the end of one data record and the beginning of the next. This could be useful in scenarios where data needed to be organized into discrete units, such as in database management or data transmission protocols.
The use of the "FS" character has diminished with the evolution of more advanced data storage and communication techniques. However, its historical role highlights how control characters were used to manage the structure and organization of data within systems and applications.
---
GS (group separator)
In ASCII (American Standard Code for Information Interchange), the decimal value for the "GS" (Group Separator) control character is 29. The "GS" character is a non-printable control character historically used to separate and group data within a stream of data.
Here's the information about the "GS" control character in ASCII:
- **Decimal Value:** 29
- **Binary Representation:** 00011101
- **Character:** The "GS" control character doesn't have a visible graphical representation like letters or symbols. It's used to separate and group data.
The "GS" control character was often used to indicate the separation of data groups within a stream of data. Similar to other control characters like "FS" (File Separator) and "RS" (Record Separator), the "GS" character could be employed to help organize and structure data in situations where multiple pieces of information needed to be grouped together.
For example, in certain older data transmission and communication protocols, the "GS" character might be used to delineate different segments of data within a message. This could be helpful in scenarios where complex data structures needed to be conveyed between devices or systems.
As technology has evolved, the use of control characters like "GS" has diminished with the advent of more sophisticated data encoding and communication methods. However, its historical significance demonstrates how control characters played a role in managing data organization and transmission.
---
RS (record separator)
In ASCII (American Standard Code for Information Interchange), the decimal value for the "RS" (Record Separator) control character is 30. The "RS" character is a non-printable control character historically used to separate and mark the end of data records within a stream of data.
Here's the information about the "RS" control character in ASCII:
- **Decimal Value:** 30
- **Binary Representation:** 00011110
- **Character:** The "RS" control character doesn't have a visible graphical representation like letters or symbols. It's used to mark the end of data records.
The "RS" control character was often used to indicate the separation of data records within a stream of data. It was particularly useful for organizing and structuring data in scenarios where different pieces of information needed to be grouped together as distinct records.
For example, in older communication protocols and data storage systems, the "RS" character might be used to delineate different data records in a dataset or message. This could be relevant in scenarios where data needed to be organized into logical units for processing or interpretation.
As technology has advanced, the use of control characters like "RS" has become less prevalent, replaced by more advanced data structuring and communication methods. Nevertheless, the historical role of "RS" demonstrates how control characters were employed to manage data segmentation and organization.
---
US (unit separator)
In ASCII (American Standard Code for Information Interchange), the decimal value for the "US" (Unit Separator) control character is 31. The "US" character is a non-printable control character historically used to separate and mark the end of units within a stream of data.
Here's the information about the "US" control character in ASCII:
- **Decimal Value:** 31
- **Binary Representation:** 00011111
- **Character:** The "US" control character doesn't have a visible graphical representation like letters or symbols. It's used to mark the end of data units.
The "US" control character was often used to indicate the separation of data units within a stream of data. Similar to other control characters like "RS" (Record Separator) and "GS" (Group Separator), the "US" character could be employed to help organize and structure data in situations where different pieces of information needed to be delineated.
For example, in certain communication protocols and data transmission scenarios, the "US" character might be used to separate different data units within a message. This could be relevant when multiple pieces of data needed to be transmitted together but kept distinct for processing purposes.
As technology has evolved, the use of control characters like "US" has become less common, replaced by more advanced data structuring and communication techniques. However, the historical role of "US" underscores how control characters were used to manage data segmentation and organization in various contexts.
---
(space)
In ASCII (American Standard Code for Information Interchange), the decimal value for the "Space" character is 32. The space character is a printable character used to represent a blank space or gap between words or other characters in text.
Here's the information about the "Space" character in ASCII:
- **Decimal Value:** 32
- **Binary Representation:** 00100000
- **Character:** The "Space" character is represented by a blank space and is often used to create space between words and other characters in text.
The "Space" character is one of the most common and recognizable characters in ASCII. It's used for formatting and readability, allowing words and sentences to be separated and presented in a clear and organized manner. It doesn't have any visual representation other than creating a blank space on the screen or in printed text.
The "Space" character's primary function is to provide a way to separate words and make text more legible. It's widely used in text editing, word processing, programming, and other applications involving written communication.
*/
#endif