Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old Aug 13th, 2007, 8:53 PM   #11
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
You need a little bit more than addressing modes.

Memory is a hardware device. An 8-bit memory is a set of elements which can make 8 bits available at once. It does this by the simple expedient of having 8 wires attached to the individual bits. These wires attach to the processor, which has 8 logical elements capable of holding the states which exist on these 8 lines. This set of wires is called the data bus.

Let's suppose that the memory consists of two of these 8-bit (each) thingamajigs.

To get the data from the first one, we put a zero on a different wire, called an address wire. The addressing logic on the first element is configured with an inverter. The element, seeing that zero value, inverted to a 1, places its 8 bits of data on the data bus. Another signal in the processor gates that data into its set of bits (a register, let us call it). Eight bits have been transferred at once.

The second element has circuitry similar to the first, but without the inverter attached. It will do nothing when the zero is on the address line. When a one is put on the line, though, it will gate ITS 8 bits of data onto the bus. The other element, seeing a zero, will leave the bus alone. The micro will thus have read the 8 bits from element two. It knows it is element two, because it put the signal on the wire that selected element two. That selection wire is known as the address bus.

That address wire is binary. That is, it has two valid states, zero and one. If we raise the number of valid states to the power of the number of wires, we get the number of elements that can be addressed. With the one wire we get 2^1, which is 2. We can address two elements.

If we increase the number of wires to 16, and add logic which will provide a distinct addressing gate to each element of our memory, we see that we can address 2^16 elements. That is 65,536 elements, a value often referred to as 64K. Those 16 wires are known as the address bus.

All this has nothing to do with addressing modes. Addressing modes merely allow one a number of different ways to get a pattern onto the address bus.

This post is of necessity somewhat brief. One may quibble about whether or not a memory element is gated by a one or by a zero or by the edge that forms the transition between a one and a zero. It is in fact immaterial. One just designs the memory and the processor so that each works with the other.

EDIT: Woops, posted while 'lectric was posting.

EDIT TWO: See how I edited my post with additional information? I also made it clear that this information is additional. If you edit a post, do not delete content that has already been responded to. It makes a sensible reader go "huh???"
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hexadecimal Memory Address Question 357mag C++ 1 Jul 8th, 2007 9:19 PM
Heap vs. Stack memory Eric the Red C++ 11 Oct 24th, 2006 6:18 PM
When to use the new keyword in C++? titaniumdecoy C++ 28 Mar 16th, 2006 12:36 PM
Pointers in C (Part II) Stack Overflow C 2 Apr 29th, 2005 10:39 AM
Pointers in C (Part I) Stack Overflow C 4 Apr 28th, 2005 7:03 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 6:16 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC