Binary number problem

Hello,

I have a 14 bit number in the RAM. The RAM has 19 bit address bus. I generate a 19 bit address and retrieve that 14 bit number and then concatenate it with 5 bit number to get the data from other part of the memory. So, for example the number is (011F) hex at memory location

0000000000000000000. I get that number by generating memory address 0000000000000000000. Then I concatenate (011F) hex with "00000" to make 19 bit memory address again to reach somewhere in the memory and pick another data. The binay equivalent of (011F) hex is "0000000100011111". I put this number on the address bus bits 5 to 18 and put the "00000" on the address bus LSB bits from 0 to 4. So, the 14 bit number becomes (23E0)hex which is the base address of my first LUT value. My memory is 512K x 18 = 9M bits.18 bit is the data bus. I partioned the memory between the pointers and Lookup table values. The pointers are 257 x 64 = 16448 decimal and rest of the memory is occupied b y the LUT My questions are as follows
  1. When I concatenate the 14 bit number with the 5 bit number and make the address change what am I actually doing to the number am i multiplying the 14 bit number by 32 or what am i doing exactly?
  2. what is the actual maximum number I can use to point to a LUT.

Please Advice! John.

Reply to
john
Loading thread data ...

You are multiplying the 14-bit number by 2`5 (32) then adding the 5-bit number to it

Someone else can do that one.

--
Bill Sloman, Nijmegen
Reply to
bill.sloman

Hi,

Thanks for the reply! Would you please advice me that how many address locations I can access in the RAM or after multiplying the number with

32 and adding 5 bits to it what will be the range of the memory access I will have?

Thanks

snipped-for-privacy@ieee.org wrote:

Reply to
john

On Fri, 12 May 2006 09:13:14 -0700, john top-posted:

0000000000000000000-1111111111111111111

That'd be table 0, item 0 through table 16,383, item 31.

Hope This Helps! Rich

Reply to
Rich Grise

Hi,

i am sorry. I did not understand it. would you please explain in little more detail..

Thanks John

Reply to
john

john wrote:

you have 19 bit address bus so you have 2^19 = 524288 address

0000000000000000000 = 0 0000000000000000001 = 1 0000000000000000010 = 2 0000000000000000011 = 3 .... .... 1111111111111111100 = 524284 1111111111111111101 = 524285 1111111111111111110 = 524286 1111111111111111111 = 524287

Ahmed

Reply to
Ahmed Samieh

I don't know how much simpler I can make it. You've already stated the problem _and_ the solution. You have a 14-bit address bus that you want to shift left by 5 bits, and append an addional 5-bit number, that indicates which table element, so that you get 2^14 tables:

Address: xx xxxx xxxx xxxx (conveniently grouped in hexadecimal nybbles) range: 00 0000 0000 0000 = 0 decimal 11 1111 1111 1111 = 16,383 decimal So then, you shift that address left by 5 bits, and append 00000 binary:

Address: xxx xxxx xxxx xxx0 0000 range: 000 0000 0000 0000 0000 = 0 decimal 111 1111 1111 1110 0000 = 524256 decimal, but remember, this is the address of element 0 of table 16,393.

Then, you use the lower 5 bits for the table element, and you get:

ttt tttt tttt ttte eeeee to address a specific LUT element.

So, it's up to you to figure out how to arrange your memory, because you can access it all.

Good Luck! Rich

Reply to
Rich Grise

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.