Alat konversi online string heksadesimal ke ASCII



TentangAlat konversi online string heksadesimal ke ASCII:

Alat konversi string heksadesimal ke ASCII online ini membantu Anda mengonversi array heksadesimal menjadi string ASCII.

Simbol pemisah array heksadesimal yang didukung termasuk ("", " ", "0x", "0X", "\0x", "\0X", "\x", "\X", "\n", "\t") .

Hex (Hex):

Sistem angka heksadesimal terdiri dari 16 karakter, termasuk (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) plus (a, b, e, d, e, f) 6 Karakter Karena sistem bilangan heksadesimal dapat mewakili string biner dengan cara yang dapat dibaca, maka sistem ini banyak digunakan dalam ilmu komputer. String hash SHA256 biasanya ditampilkan sebagai string gaya heksadesimal, digunakan dalam HTML. Sistem warna juga dapat direpresentasikan sebagai angka heksadesimal, dari # 000000 (hitam murni) hingga #FFFFFF (putih murni).

Standar pengkodean ASCII:

ASCII (American Standard Kode untuk Informasi Interchange ) adalah standar pengkodean karakter yang paling banyak digunakan ASCII standar memiliki 7 bit panjang, total 128 karakter yang berbeda. Diperpanjang ASCII memiliki 8 bit panjang, 256 karakter yang berbeda Copyright simbol. © definisi Dalam tabel ASCII yang diperluas.

comic hex to ascii

Tautan:

Wikipedia (hex): https://en.wikipedia.org/wiki/Hexadecimal

Wikipedia (ASCII): https://en.wikipedia.org/wiki/ASCII

Konversi string heksadesimal ke ASCII dengan Python:

import binascii


def hex_to_ascii(hex_str):
    hex_str = hex_str.replace(' ', '').replace('0x', '').replace('\t', '').replace('\n', '')
    ascii_str = binascii.unhexlify(hex_str.encode())
    return ascii_str


hex_input = '54 68 69 73 20 69 73 20 61 6e 20 65 78 61 6d 70 6c 65 2e'
ascii_output = hex_to_ascii(hex_input)
print('ascii result is:{0}'.format(ascii_output))

-------------------
ascii result is:b'This is an example.'

Konversi string heksadesimal ke ASCII di Jawa:

public class NumberConvertManager {
    public static String hex_to_ascii(String hex_str) {
        hex_str = hex_str.replace(" ", "").replace("0x", "").replace("\\x", "");
        StringBuilder ascii_str = new StringBuilder();
        for (int i = 0; i < hex_str.length(); i += 2) {
            String str = hex_str.substring(i, i + 2);
            ascii_str.append((char) Integer.parseInt(str, 16));
        }
        return ascii_str.toString();
    }

    public static void main(String[] args) {
        String hex_input  = "54 68 69 73 20 69 73 20 61 6e 20 65 78 61 6d 70 6c 65 2e";
        String ascii_output  = hex_to_ascii(hex_input);
        System.out.println("ascii result is:" + ascii_output );
    }
}

-------------------
ascii result is:This is an example.