Diewuxi

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

Blog / engineering_technology / computer / general / other / Encoding format for number in computer systems

Blog


Article^ Parent

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
Category: engineering_technology/computer/general/other
Tag: encoding
Link: https://www.diewuxi.com/blog/article/68.html

Some encoding format for number in computer system.

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]
                        

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)
                        

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

Comments [0]

There is no comments now.

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


Diewuxi 2017--2024