文本到十進位
輕鬆將文本轉換為十進位表示
轉換器工具
Enter text to convert to decimal values. Choose between UTF-8 (supports all characters) and ASCII (only 128 characters). Options to add spaces between decimal values are available.
換算表:
Character | 十進位值 |
---|
關於文字到十進位的轉換
文本編碼
文字字元在計算機中由數位表示。不同的編碼系統對字元使用不同的數位:
ASCII
The ASCII (American Standard Code for Information Interchange) encoding uses 7 bits to represent 128 characters, including English letters (both uppercase and lowercase), digits, and common punctuation symbols. Each ASCII character can be represented by a unique number between 0 and 127.
UTF-8
UTF-8 是一種可變長度字元編碼,可以表示 Unicode 標準中的每個字元。它為每個字元使用 1 到 4 個字節。UTF-8 向後相容 ASCII,這意味著前 128 個 UTF-8 字元與 ASCII 相同。
轉換過程
將文字轉換為十進位包括以下步驟:
- Determine the numerical value of each character using the chosen encoding (ASCII or UTF-8).
- Convert each character to its corresponding decimal (base-10) value.
- (可選)用空格分隔每個十進位值以提高可讀性。
範例:將 「Hi」 轉換為 Decimal
Step 1: Convert each character to its numerical value (ASCII):
H → 72
i → 105
Step 2: Combine the decimal values (with spaces):
72 105
使用說明
- When using ASCII encoding, any character outside the 7-bit ASCII range (128-255) will be converted to a question mark (?).
- UTF-8 編碼支援所有 Unicode 字元,包括特殊符號、表情符號和非英語語言中的字元。
- 如果每個UTF-8字元使用多個字節,則可以由多個十進位值表示。
- 十進位值通常用於計算數值運算和數據表示。