Questions tagged [addressing]
153 questions
2
votes
2 answers
data bus and addressing memory confusion
I have learned 8086 CPU has 16bit data bus, and Pentium CPU has 32bit data bus, which mean each memory address holds size of data bus.
For example:
16bit = 2^16 = 65,536
binary 0000 0000 0000 0000 ~ 1111 1111 1111 1111
hex 0000 0000 ~ FFFF…

Jeungwoo Park
- 117
- 6
2
votes
0 answers
Why am I getting a -1 for the network prefix length in Java?
So I'm writing a program that creates a list of all of the IP addresses from the Network address to the Broadcast address and then looping through them and checking if they are available. The code I have works perfectly fine on wired networks, but…

Jonathan Iannacone
- 21
- 2
2
votes
2 answers
C# foreaching through list won't change values
I have a struct holding condition informations.
private struct hintStructure
{
public string id;
public float value;
public bool alreadyWarned;
}
private List hints;
Whenever my program changes a value, an event is…

Jonas Zimmer
- 161
- 2
- 15
2
votes
2 answers
Why 32-bit processor can only address 4GiB of memory, even with large word size?
Until now I thought that a 32-bit processor can use 4 GiB of memory because 232 is 4 GiB, but this approach means processor have word size = 1 byte. So a process with 32-bit program counter can address 232 different memory words and hence we have 4…

mightyWOZ
- 7,946
- 3
- 29
- 46
2
votes
2 answers
x86 Intel Assembler LEA
looking at the following code:
(ebp-0x8 -> int)
(ebp-0x4 -> int*)
=> 0x80483f3 : mov DWORD PTR [ebp-0x8],0x0
0x80483fa : mov DWORD PTR [ebp-0x4],0x0
0x8048401 : mov DWORD PTR [ebp-0x8],0xa
0x8048408…

Michael
- 595
- 5
- 19
2
votes
1 answer
Transform based indexed mode to indirect addressing mode (x86 assembly)
I am using x86 AT&T Assembly on Ubuntu.
I need to rewrite any complex indirect addressing modes, like based indexed mode, into simple indirect addressing mode.
For example, take this snippet:
.L4:
movl i, %eax
movzbl ch, %edx
movb …

Lorenz Leitner
- 521
- 7
- 22
2
votes
1 answer
Difference between IP address and MAC address?
I know they are address schemes used in different layers, and that IPV4 is 32 bits while MAC is 48 bits.
My questions are:
Why do we need two different address schemes?
What is the problem if we decided to use the same address for both purposes?…

LYH
- 78
- 8
2
votes
3 answers
addressing in assembler
There is something I can't digest. I'm learning some assembler and right now I'm at the chapter with addressing. I understand the concept of brackets for dereferencing, but somehow when I see the usage of it I just can't soak up the point of it. To…

Pyjong
- 3,095
- 4
- 32
- 50
2
votes
2 answers
How do i check a ip address range whether it falls in Class A,Class B,Class C
import java.net.*;
import java.io.*;
public class ip_host {
public static void main(String args[]) throws Exception {
System.out.println("Enter the host name :");
String n = new DataInputStream(System.in).readLine();
…

MajoR
- 121
- 2
- 11
2
votes
1 answer
Addressing an index in array in Lua
I am trying to write a simple game using Love 2d engine. It uses lua as the scripting language. I have some problems with arrays and can't find any solution. Here is my issue:
for i = 1, 10 do
objects.asteroids = {}
objects.asteroids[i] =…

Paweł Jastrzębski
- 747
- 1
- 6
- 24
2
votes
2 answers
Passing an Array of an Array to a subroutine using perl
Ok, so I got an array of an array (AoA) and I need to pass it to a subroutine, and then access it. This works… but is it strictly correct and indeed is there a better way that I should be doing this?
#!/usr/bin/perl
$a =…

user3069232
- 8,587
- 7
- 46
- 87
2
votes
1 answer
x86 and MIPS memory addressing
I have a question on memory addressing on x86 and MIPS. Now I am taking a computer organization class at my school and havin trouble because the professor's explanation is not so clear to me. What I know about the memory addressing is below.
The…

eChung00
- 633
- 1
- 12
- 27
2
votes
1 answer
MIPS label addressing?
This is all related, and I tried to piece it all together as logically as I could, so please bear with me.
I'm really confused as to how to properly address labels. For example, in the following bit of code, "bne" translates to…

Laurence
- 157
- 1
- 2
- 10
2
votes
3 answers
C++ hashing: Open addressing and Chaining
For Chaining:
Can someone please explain this concept to me and provide me a theory example and a simple code one?
I get the idea of "Each table location points to a linked list (chain) of items that hash to this location", but I can't seem to…

forthewinwin
- 4,455
- 4
- 19
- 17
1
vote
2 answers
Determining the number of address lines and RAM word size using C
Can anyone please let me know how to deterimine the number of address lines in a processor using C ? This can't be equal to size of the processor registers since the number of address lines may be different compared to the size of registers (for…

mezda
- 3,537
- 6
- 30
- 37