Notices
Results 1 to 7 of 7

Thread: Computer Science - Word Problem

  1. #1 Computer Science - Word Problem 
    New Member
    Join Date
    Feb 2012
    Posts
    4
    Greetings,
    I've just started taking a computer systems class, and although it wasn't a pre-requisite, my teacher is recommending that students take a programming course, specifically C++, prior to taking the computer systems class. The teacher said if we didn't, we would really struggle. I'm trying it out and I've encountered my first problem. I understand most of the solution given except for two aspects. If someone could please help me to understand those two aspects, it would help me greatly.

    Word Problem:
    Suppose a CPU is rated at 2.5GHz. what is the average length of time needed to execute one instruction?

    Solution:
    2.5GHz is 2.5 X 10exp9 instructions per second. That is 1/2.5 X 10exp9 = .4*10exp-9 or 400 picoseconds per per instruction.

    1. Why is 1 being divided into 2.5
    2. I don't get 400 picoseconds when I calculate 4*10exp-9

    Can someone please help?


    Reply With Quote  
     

  2.  
     

  3. #2  
    Moderator Moderator Markus Hanke's Avatar
    Join Date
    Nov 2011
    Location
    Ireland
    Posts
    7,302
    1. It's because the speed is 2.5 GHZ, and not 1 GHz. So you have to divide by 2.5
    2. You have to calculate 0.4*10exp-9, not 4*10exp-9.

    Does that help ?


    Reply With Quote  
     

  4. #3  
    New Member
    Join Date
    Feb 2012
    Posts
    4
    1. It's because the speed is 2.5 GHZ, and not 1 GHz. So you have to divide by 2.5
    So the one that I am dividing in to 2.5, that is the 1 instruction?
    2. You have to calculate 0.4*10exp-9, not 4*10exp-9.
    So, 0.4*10exp-9...doesn't that equal .0000000004?


    Reply With Quote  
     

  5. #4  
    Forum Freshman
    Join Date
    Feb 2012
    Location
    Santa Cruz, CA
    Posts
    82
    Hertz (Hz) is a unit of inverse time; how many cycles happen per unit time, in this case the second, so its unit is 1/s.

    The inverse of frequency is the period, again usually in seconds. It says how long it takes for one cycle to complete.

    The problem is giving you the frequency, but the answer it wants is the period, so you are figuring out: 1/ frequency = period.
    Reply With Quote  
     

  6. #5  
    New Member
    Join Date
    Feb 2012
    Posts
    4
    Thank you so much for explaining the inversion of time. That totally helped me. I still just have one more question. I am seeing that 0.4X10exp-9 equals into nanoseconds. Im not understanding why further inversion is being done to translate it into picoseconds.
    Reply With Quote  
     

  7. #6  
    Forum Freshman
    Join Date
    Feb 2012
    Location
    Santa Cruz, CA
    Posts
    82
    The nano prefix means 10-9. The pico prefix means 10-12.

    What does 0.4 nanoseconds mean? Take your decimal place and shift it over 9 places: 0.000000000

    Now put a .4 there. that means we have to shift one more 0.0000000000 (10 zeros) and place our 4: 0.00000000004

    What does 400 picoseconds mean? Take your decimal place and shift it over 12 places: 0.000000000000
    Now place your 400. But 400 is 4 * 102 so we have to shift two to the left 0.0000000000 (10 zeros) and place our 4: 0.00000000004

    If you noticed, they are the same thing. Usually the convention is to stay within the 0-999 range of your powers of 3 and use that prefix, so saying 400 picoseconds is "nicer" than 0.4 nanoseconds, but the convention is broken all the time. People say that the speed of light is roughly 3 * 108 meters/second, and very rarely say 300 megameters/second.

    So:

    Know your prefixes.

    Convert as needed.
    Reply With Quote  
     

  8. #7  
    New Member
    Join Date
    Feb 2012
    Posts
    4
    I finally understand the solution of the problem thanks to the explanation of inversion of time and converting nanoseconds to picoseconds. Thank you everyone : )
    Reply With Quote  
     

Similar Threads

  1. Word problem
    By verzen in forum Mathematics
    Replies: 5
    Last Post: April 10th, 2010, 08:07 PM
  2. Word Problem
    By SteveC in forum Mathematics
    Replies: 2
    Last Post: December 17th, 2009, 03:31 AM
  3. Simple-ish word problem
    By verzen in forum Mathematics
    Replies: 4
    Last Post: October 26th, 2009, 11:34 PM
  4. Computer Engineering or Computer Science?
    By nick1760 in forum Computer Science
    Replies: 5
    Last Post: May 6th, 2009, 10:23 PM
  5. word problem, please help!
    By rgba in forum Mathematics
    Replies: 2
    Last Post: September 17th, 2008, 12:22 PM
Tags for this Thread

View Tag Cloud

Bookmarks
Bookmarks
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •