Solved

Far pointers

Posted on 2000-04-15
5
192 Views
Last Modified: 2011-09-20
A processor with 20 bit address line can address upto 1 mb where as its Register is 16 bit which means it can have address upto 2tothepower16 bytes .How can the 1mb RAM be addresed by the Register ?
0
Comment
Question by:r_sam_14
  • 3
  • 2
5 Comments
 

Author Comment

by:r_sam_14
ID: 2719113
The discussion can revole arround Segment:offset and explain what is segment:offset .
0
 
LVL 22

Accepted Solution

by:
nietod earned 25 total points
ID: 2719157
The segment value and the offset value are botyh 16 bits.  They are mathematically combined to generate a 20 bit address.  To be preceise the address generated is Segment*16+Offset.  Or if you prefere Segment << 4 + offset.  Where that << 4 shifts the segment left 4 bits so its most significant bit is now the high bit of the 20 bit address.
0
 
LVL 22

Expert Comment

by:nietod
ID: 2719162
So a 16 bit register cannot be used to acccess all of 1M of ram, not by itself.  It must use a segment register to.  for any parituclar vlaue in a segment register, the 16 bit pointer register can access any value within a 64K "window".  By addjusting the segment register, you can move the "window" about in memory and thus address every byte in 1M.

Let me know if you have any questions.
0
 

Author Comment

by:r_sam_14
ID: 2720018
nietod

     Kindly explain me what is segement:offset is ? explain it with example ?
0
 
LVL 22

Expert Comment

by:nietod
ID: 2720312
In a segmented architecture addresses are (ultimately) specified using two numerical values.  A segment and an offset.  The actual address used when accessing memory is determined by a mathematical formula using these to values.  In the x86 family the formula is segment*16+offset.  That generates an address, a number, that is the memory location to be accessed.  This formula can generate numbers that are larger than either the segment or offset value.  So it can be used to access memory that is at a higher address than could be addressed if only one value (and no formula) was used.   Thus it can be used to access a larger memory space.

I'm not sure how to give you an example.  Does that help?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now