English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I know what is 2's complement and how to calculate 2's complement. How do I calculate a negative number (ex: -14096) to 10's complement to 8 digits?

2007-02-21 11:49:37 · 1 answers · asked by Rosy 3 in Computers & Internet Programming & Design

1 answers

10's compliment works just as 2's does.

You compliment each digit.
0 <- > 0
1 <-> 9
2 <-> 8
3 <-> 7
4 <-> 6
5 <-> 5

For subtraction (or adding a negative) first compute the compliment then add. The result sign will match that of the operand with the highest absolute value.

2007-02-21 16:08:29 · answer #1 · answered by run4ever79 3 · 0 0

fedest.com, questions and answers