Clock cycle question

Discussion in 'A+' started by mikehende, May 4, 2006.

  1. mikehende

    mikehende Kilobyte Poster

    265
    0
    19
    I am not sure I am getting this correctly, how many clock cycles does it take for a CPU to calculate 2+3?
     
  2. hbroomhall

    hbroomhall Petabyte Poster Gold Member

    6,624
    117
    224
    Looking at my '486 book - which is the latest I can lay my hands on quickly:

    Code:
    MOV   al,2              1 clock
    ADD   al,3              3 clocks
    
    So 4 clocks.

    However, at this point the sum is still in the processor - you didn't say anything about what to do with it!

    Harry.
     
    Certifications: ECDL A+ Network+ i-Net+
    WIP: Server+
  3. zimbo
    Honorary Member

    zimbo Petabyte Poster

    5,215
    99
    181
    ah wonderful assembly! did a short course in it a while back in my HND and loved it!
     
    Certifications: B.Sc, MCDST & MCSA
    WIP: M.Sc - Computer Forensics
  4. Clyde

    Clyde Megabyte Poster

    558
    15
    62
    and the answer is - it depends!

    Depends on the CPU. This is one of the factors that can make once CPU 'faster' than another, at the same clock speed.
     
    Certifications: A+, Network+, Security+, MCSA, MCSE
    WIP: MCITP
  5. mikehende

    mikehende Kilobyte Poster

    265
    0
    19
    Reading from the book it says on page 56:

    "The CPU requires at least 2 clock cycles to act on a command and usually more. In fact, a CPU may require hundreds of clock cycles to process some commands."

    but unless I am missing it and I don't think so, it does not say specifically how many cycles are needed to calculate 2+3 which is why I am inquiring here, can you tell me just "how" you got to the answer you gave above please?
     
  6. hbroomhall

    hbroomhall Petabyte Poster Gold Member

    6,624
    117
    224
    The above gave me a clue as to which book you are refering!

    First - you have to understand that Meyer's decription of how a microprocessor works is *heavily* simplified. He leaves out a lot of detail in order not to overwhelm the beginner. In addition - IMHO - that detail is not required by CompTIA. The important thing is to give the flavour of how things work.

    Second - the timings I gave are lifted straight from the Intel programming manual. This manual gives the timings for every instruction that is valid on the processor. However - Intel warns that those timings are only correct if a fairly extensive set of conditions obtain. If they don't obtain then the timings are longer.

    Finaly - some instructions, particularly floating-point ones, can easily be hundreds of cycles long.

    Harry.
     
    Certifications: ECDL A+ Network+ i-Net+
    WIP: Server+
  7. mikehende

    mikehende Kilobyte Poster

    265
    0
    19
    So, is this something I should learn which might come on the test? Meaning, should I learn how to calculate clock speeds for "any" commands whre the A+ is concerned?
     
  8. Malnomates

    Malnomates Megabyte Poster

    667
    25
    67
    The A+ exam will include processor orientated questions,but they will be based on any or all of the following..

    socket type
    External speed
    Internal speed
    multipliers
    L1,L2 and L3 cache

    Pin counts are worth learning too by the way.


    You need to be aware of clock cycles,what they are and where they interract in the PC,how they interract with memory speeds etc,but thats as far as it goes for the exam.

    I'll take my hat off to you though,you are doing what I did when I read this sort of stuff in the Meyers book-I wanted to know more than he was letting on,nothing wrong with that but don't cloud your studies too much,if you know what I mean?

    Click this link for an excellent paper on cpu specs.. http://www.umlandt.com/CPUs_summary.doc
     
    Certifications: A+ Network+
  9. Baba O'Riley

    Baba O'Riley Gigabyte Poster

    1,760
    23
    99
    I have never seen a question even remotely as in depth as that on any A+ material. Be careful not to waste too much time studying stuff that's never going to come up.

    Good for you for being curious though. :D
     
    Certifications: A+, Network+
    WIP: 70-270
  10. mikehende

    mikehende Kilobyte Poster

    265
    0
    19
    Well, this is me guys, Meyers makes references frequently to things in the book which is not explained and this sparks my curiousity so I spend a lot of time researching these things, as a matter of fact, I spend most of my study time researching on the net than I do reading, any wonder I am only on page 135?

    Appreciate the link Malnomates, see what I mean? Another reason for me to deter from the book. :D
     
  11. hbroomhall

    hbroomhall Petabyte Poster Gold Member

    6,624
    117
    224

    Basicaly - no. You won't even be asked about clocks for instructions as far as I know.

    Harry.
     
    Certifications: ECDL A+ Network+ i-Net+
    WIP: Server+
  12. mikehende

    mikehende Kilobyte Poster

    265
    0
    19
    Regarding the link from Malnomates's last post on CPU info, would I have to memorize all of that info for the A+?
     
  13. hbroomhall

    hbroomhall Petabyte Poster Gold Member

    6,624
    117
    224
    IMHO - not all the detail. You should be fluent in the socket/slot names/numbers, and have some idea which group of processors fit which one.

    It helps to have some idea of clock speeds, so that you realize that an answer that has a 4GHz PII is clearly wrong, but detailed knowledge of what the speed values are won't be needed.

    Harry.
     
    Certifications: ECDL A+ Network+ i-Net+
    WIP: Server+
  14. mikehende

    mikehende Kilobyte Poster

    265
    0
    19
    This I don't understand, can anyone please clarify?
     
  15. hbroomhall

    hbroomhall Petabyte Poster Gold Member

    6,624
    117
    224
    The original 8086 used about 4 clocks to do a MOV (from memory - my books are at home). By the time that the 80486 came out Intel had optimized it down to 1 clock (in this particular case).

    So for a given speed of clock - if you use less clocks to do an operation then the processor will be faster for that operation.

    Harry.
     
    Certifications: ECDL A+ Network+ i-Net+
    WIP: Server+
  16. mikehende

    mikehende Kilobyte Poster

    265
    0
    19
    Nicely explained, thanks Harry!
     
  17. mikehende

    mikehende Kilobyte Poster

    265
    0
    19
    BTW, how long did it take you guys to study for and pass the A+?
     
  18. Mr.Cheeks

    Mr.Cheeks 1st ever Gold Member! Gold Member

    5,373
    89
    190
    still studing, started in Jan although the main reason for the delay is i am doing it in college, so im will be going for my exam prob 2 weeks end of college finishes, dont know whether that is in jul/aug...
     
  19. hbroomhall

    hbroomhall Petabyte Poster Gold Member

    6,624
    117
    224
    2 months. But then I've been doing this sort of thing for 25 years!

    As A+ was my first exam since I left school I took a fair amount of care to get it right.

    Harry.
     
    Certifications: ECDL A+ Network+ i-Net+
    WIP: Server+
  20. Baba O'Riley

    Baba O'Riley Gigabyte Poster

    1,760
    23
    99
    It took me six months but that was with two months of doing absolutely nothing while I was moving house and settling into a new job.

    I wanted to make sure I at least passed my first cert first time or I'd feel there's not much point in carrying on :) (not that I'm knocking anyone who didn't pass first time mind you).
     
    Certifications: A+, Network+
    WIP: 70-270

Share This Page

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.