Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Radix problem

 
Chandra Bhatt
Ranch Hand
Posts: 1710
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I am used to decimal, octal, hexadecimal, binary.
But how to compute when radix is somewhat 4,5 ...


Please help me!


Regards,
cmbhatt
 
Steven Young
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1111 for base 3:

1 * 3 "to the power of" 0 = 1
1 * 3 "to the power of" 1 = 3
1 * 3 "to the power of" 2 = 9 (i.e 3*3)
1 * 3 "to the power of" 3 = 27 (i.e 3*3*3)

So total is 1 + 3 + 9 = 27 = 40

1111 for base 4:

1 * 4 "to power of" 0 = 1
1 * 4 "to power of" 1 = 4
1 * 4 "to power of" 2 = 16 (i.e 4*4)
1 * 4 "to power of" 3 = 64 (i.e 4*4*4)

So total is 1 + 4 + 16 + 64 = 85

Hope this helps. I'm no Mathematics teacher, so this is the best that I can explain.
 
Chandra Bhatt
Ranch Hand
Posts: 1710
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fantastic Steven Young!

Awesome description, even a child "like me" can understand this!

Great Job!


Thankkoo!
cmbhatt
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic