How to perform base-5 addition , when negative place values are given?

153 views Asked by At

In a base-5 number system having the digits T,M,0,1,2 and their place values are -2,-1,0,+1,+2 respectively, then:

  1. What is the maximum decimal value that can be formed?
  2. (MT01) + (1TM0) = ??

This question was given in a recruitment test of a VLSI company.. please suggest an answer..

1

There are 1 answers

3
Sakthi Ram On

> Explanation:

The implementation is very same as decimal concept in base10. Just multiply each digit with corresponding place value, i.e. T*(5^-2) + M*(5^-1) + 0*(5^0) + 1*(5^1) + 2*(5^2).

Base-5 number system digits: 0,1,2,3,4. Based on place values given, in order to get max decimal value, we can say: M=4 & T=3. And thus below are the answers:

1) Max decimal value = **55.92**
2) (MT01) + (1TM0) = (4301)base5 + (1340)base5 = (796)base10 -- decimal value
                                               = **(11141)base5**