Forums: » Register « |  Free Tools |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |

New Free Tools on Dev Shed!

#1
February 20th, 2013, 05:23 PM
 sargun70
Registered User

Join Date: Jan 2013
Posts: 7
Time spent in forums: 1 h 11 m 30 sec
Reputation Power: 0
Numerical problem

How many bits are required to represent a 3 digit pin?

#2
February 20th, 2013, 05:51 PM
 requinix
Forgetful

Join Date: Mar 2007
Location: Washington, USA
Posts: 13,472
Time spent in forums: 5 Months 2 Weeks 2 Days 4 h 9 m 9 sec
Reputation Power: 9259
1. How many possible "digit"s are there?
2. How many possible bits are there?
3. What's the lowest power of (answer from #2) that is at least as much as (answer to #1)?

#3
February 22nd, 2013, 12:21 PM
 sargun70
Registered User

Join Date: Jan 2013
Posts: 7
Time spent in forums: 1 h 11 m 30 sec
Reputation Power: 0
A digit can be from 0 to 9. Total no of digits are 3.

#4
February 22nd, 2013, 01:13 PM
 requinix
Forgetful

Join Date: Mar 2007
Location: Washington, USA
Posts: 13,472
Time spent in forums: 5 Months 2 Weeks 2 Days 4 h 9 m 9 sec
Reputation Power: 9259
So that's 10^3=1000 combinations, right? What's the lowest power of 2 that's >= 1000? And how many bits is that?

#5
February 22nd, 2013, 01:32 PM
 sargun70
Registered User

Join Date: Jan 2013
Posts: 7
Time spent in forums: 1 h 11 m 30 sec
Reputation Power: 0
2 raised to the power 10 is 1024.

#6
February 22nd, 2013, 01:32 PM
 sargun70
Registered User

Join Date: Jan 2013
Posts: 7
Time spent in forums: 1 h 11 m 30 sec
Reputation Power: 0
Quote:
 Originally Posted by sargun70 2 raised to the power 10 is 1024.

Yes there are 1000 combinations.

#7
February 22nd, 2013, 01:50 PM
 requinix
Forgetful

Join Date: Mar 2007
Location: Washington, USA
Posts: 13,472
Time spent in forums: 5 Months 2 Weeks 2 Days 4 h 9 m 9 sec
Reputation Power: 9259
Seems I have to be more and more exact... I meant > not >=.

Have you figured out the answer yet? Do you know why the answer is not 11?

#8
February 22nd, 2013, 02:36 PM
 sargun70
Registered User

Join Date: Jan 2013
Posts: 7
Time spent in forums: 1 h 11 m 30 sec
Reputation Power: 0
Yes I get it. The answer is 10.

 Viewing: Dev Shed Forums > System Administration > Security and Cryptography > Numerical problem