本文原本發表於MSN分享空間, 2007/05/28 19:58.
This post comes from previous post: 巧合.
Notation:
(1) a value of M-ary system is denoted as V_{M} and a value of decimal system is denoted as V_{10} or V for convenience.
(2) a value of M-ary system with D digits is written as
Proposition:
Exmaples:
(1) quaternary:
By observing the examples, it's easy to figure out the rules.
The details of proof is not given.
This post comes from previous post: 巧合.
Notation:
(1) a value of M-ary system is denoted as V_{M} and a value of decimal system is denoted as V_{10} or V for convenience.
(2) a value of M-ary system with D digits is written as
V_{M} = [v(D-1) v(D-2) ... v(1) v(0)]_{M} where 0 <= v(i) <= (M-1)(3) V_{M} in decimal system is
V = (V_{M})_{10} = v(D-1)*M^(D-1) + v(D-2)*M^(D-2) + ... + v(1)*M + v(0)(4) rev(V_{M}) means reverse order of V_{M}:
rev(V_{M}) = [v(0) v(1) ... v(D-2) v(D-1)]_{M}(5) subtraction for two M-ary system values is analogous to decimal system.
Proposition:
For positive integer M > 1, any (2M)-ary system has
V_{M} = [(M-1) (M-2) ... 1]_{M} and U_{M} = [(M-1) (M-2) ... 1 0]_{M}.
Then we have (the subtraction is under (2M)-ary system)
V_{M} - rev(V_{M}) = [(2M-2) (2M-4) ... 4 1 (2M-1) (2M-3) ... 3 2]_{M}
and
U_{M} - rev(U_{M}) = [(2M-1) (2M-3) ... 3 0 (2M-2) (2M-4) ... 2 1]_{M}.
Exmaples:
(1) quaternary:
[3 2 1]_{4} - [1 2 3]_{4} = [1 3 2]_{4}(2) senary:
[3 2 1 0]_{4} - [0 1 2 3]_{4} = [3 0 2 1]_{4}
[5 4 3 2 1]_{6} - [1 2 3 4 5]_{6} = [4 1 5 3 2]_{6}(3) decimal:
[5 4 3 2 1 0]_{6} - [0 1 2 3 4 5]_{6} = [5 3 0 4 2 1]_{6}
[9 8 7 6 5 4 3 2 1]_{10} - [1 2 3 4 5 6 7 8 9]_{10} = [8 6 4 1 9 7 5 3 2]_{10}
[9 8 7 6 5 4 3 2 1 0]_{10} - [1 2 3 4 5 6 7 8 9 0]_{10} = [9 7 5 3 0 8 6 4 2 1]_{10}
By observing the examples, it's easy to figure out the rules.
The details of proof is not given.
沒有留言:
張貼留言