Diewuxi

Belive tomorrow will be better, love science and technology, support communication and understanding, always ready for thought turn.

Diewuxi > Blog > Article
Encoding format for number in computer systems
Date: 2022-08-28 13:00:00
Description: Some encoding format for number in computer system.
Keywords: Encoding, Signed encodings, Two's Complement Encodings, Inverse code
Tag: encoding
Link: https://www.diewuxi.com/blog/article/68.html

Some encoding format for number in computer system.

^ 1 Signed Encodings

X_ori = X_r                 x \in [0, 2^{n-1})
X_ori = 2^{n-1} - X_r       x \in (-2^{n-1}, 0]


X_ori = X_r                 x \in [0, 1)
X_ori = 1 - X_r             x \in (-1, 0]

^ 2 Two's Complement Encodings

X_com = X_r                 x \in [0, 2^{n})
X_com = 2^{n+1} + X_r       x \in [-2^{n}, 0)

X_com = X_r                 x \in [0, 1)
X_com = 2 + X_r             x \in [-1, 0)

^ 3 Inverse code

X_inv = X_r                 x \in [0, 2^{n})
X_inv = 2^{n+1} -1 + X_r    x \in (-2^{n}, 0]

X_com = X_r                 x \in [0, 1)
X_com = (2 - 2_{-n} + X_r   x \in (-1, 0]

Last modified: 2022-08-28

Viewed (34) Liked (0)
Comments [0]

There is no comments now.

Add comment(* is necessary, and email is not shown to public)