Thread: Indirect Addressing uses how many bits?

  1. #1
    Registered User
    Join Date
    Dec 2004
    Posts
    163

    Indirect Addressing uses how many bits?

    Hi guys,

    I got 2 questions, hope you won't find it stupid....

    1) How many bits does indirect addressing use? Is it 30 bits? Even though it is allocated 32 bits?

    2) Is there a thing called secondary memory algorithms? If so, is there any example?

  2. #2
    Gawking at stupidity
    Join Date
    Jul 2004
    Location
    Oregon, USA
    Posts
    3,218
    Quote Originally Posted by franziss
    1) How many bits does indirect addressing use? Is it 30 bits? Even though it is allocated 32 bits?
    If you mean "how big is a pointer" then the answer is "it depends". For example, I believe 32-bit x86 code uses 32-bit pointers, but 64-bit IA64 code uses 64-bit pointers.
    Quote Originally Posted by franziss
    2) Is there a thing called secondary memory algorithms? If so, is there any example?
    Huh? Could you give an example of what you're looking for?
    If you understand what you're doing, you're not learning anything.

  3. #3
    The C-er
    Join Date
    Mar 2004
    Posts
    192
    Is there a thing called secondary memory algorithms? If so, is there any example?
    Google says yes.

  4. #4
    Registered User
    Join Date
    Dec 2004
    Posts
    163
    Er... I'm totally blur about secondary memory algorithms. This phase is given to me by a professor and I dare not keep mailing him questions, I'm afraid he might be irritated by me....

    Thus, I post it on this forum...

  5. #5
    Registered User
    Join Date
    Sep 2004
    Posts
    719
    Quote Originally Posted by franziss
    Hi guys,

    I got 2 questions, hope you won't find it stupid....

    1) How many bits does indirect addressing use? Is it 30 bits? Even though it is allocated 32 bits?

    2) Is there a thing called secondary memory algorithms? If so, is there any example?

    i might be making this up, but i think the processor uses 36 bits...4 for the segment address and 32 for the offest address.
    i seem to have GCC 3.3.4
    But how do i start it?
    I dont have a menu for it or anything.

  6. #6
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    This is on the C board, why again?

    Quzah.
    Hope is the first step on the road to disappointment.

  7. #7
    The C-er
    Join Date
    Mar 2004
    Posts
    192
    Sounds like your professor might be talking about virtual memory and/or caching algorithms.

  8. #8
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    That sounds possible. Though I do wonder why someone in such and advanced class can't articulate a bit better.

  9. #9
    Registered User
    Join Date
    Mar 2004
    Posts
    536
    Quote Originally Posted by franziss
    Er... I'm totally blur about secondary memory algorithms. This phase is given to me by a professor and I dare not keep mailing him questions, I'm afraid he might be irritated by me....

    Thus, I post it on this forum...
    Traditionally, "secondary memory" refers to external storage on mainframes (9-track tape drives, magnetic drums, etc.) This is contrasted to "primary memory" which in contained in the CPU. Programs that need more memory than the amount of CPU "core memory" must store parts of the data base externally.

    A sort algorithm specifically fine-tuned for a large data base in secondary storage may very well be different from a sort algorithm optimized for a smaller data base that can be contained in core.

    For example some sorting algorithms require repeated access to elements near the first and near the last, whereas others require more accesses, but the accesses are more-or-less sequential. If the external storage has a large access time for elements that are not near each other (like tape drives), you really would like to see successive accesses more-or-less sequential.

    With the advent of operating systems with virtual memory, (where large parts of programs and data bases are rapidly shifted between core and external memory in a way invisible to the programmer) the importance of the difference in such algorithms has pretty much been lost on most rank-and-file programmers, except as a mild historical oddity.

    Regards,

    Dave
    Last edited by Dave Evans; 12-17-2004 at 10:11 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. SDLKey to ASCII without unicode support?
    By zacs7 in forum Game Programming
    Replies: 6
    Last Post: 10-07-2007, 03:03 AM
  2. Help counting number of bits set in an integer
    By JayDiddums10 in forum C Programming
    Replies: 5
    Last Post: 12-07-2006, 03:21 PM
  3. byte is equal 8 bits???
    By Micko in forum C Programming
    Replies: 3
    Last Post: 10-15-2004, 10:12 AM
  4. Writing binary data to a file (bits).
    By OOPboredom in forum C Programming
    Replies: 2
    Last Post: 04-05-2004, 03:53 PM
  5. New idea on conveting byte to bits/bits to byte
    By megablue in forum C Programming
    Replies: 10
    Last Post: 10-26-2003, 01:16 AM