Questions tagged [computer-architecture]

Questions about the organization and design of computer hardware.

Filter by
Sorted by
Tagged with
30 votes
6 answers
42k views

Why Do Computers Use the Binary Number System (0,1)?

Why Do Computers Use the Binary Number System (0,1)? Why don't they use Ternary Number System (0,1,2) or any other number system instead?
user avatar
40 votes
6 answers
6k views

How does a computer work?

I have been a computer nerd for many many years. I can program in quite a few languages, and I can even build them. I sat down with a buddy the other day and asked how a computer actually takes ...
user avatar
  • 509
7 votes
1 answer
22k views

Tag, index and offset of associative cache

My main issue of a homework problem is trying to figure out the different parts of the chart. I have a 3 way set associative cache with 2 word blocks, total size of 24 words. I am given $3, 180, 43, 2,...
user avatar
  • 273
4 votes
7 answers
6k views

Ternary processing instead of Binary

Most of the computers available today are designed to work with binary system. It comes from the fact that information comes in two natural form, true or false. We humans accept another form of ...
user avatar
16 votes
7 answers
16k views

How is a program executed at the CPU level?

I know this is a very common question. But I have a different angle in my mind. I will just try to articulate it here. From what I know, every instruction that a CPU executes, is in machine language ...
user avatar
10 votes
4 answers
12k views

Word- or byte-addressable? Correct terminology

Seemingly, a byte has established itself to be 8bit (is that correct?). RAM and NOR-flash can be normally accessed on a quite granular level, but it is up to the system architecture to determine if ...
user avatar
6 votes
2 answers
20k views

What is difference between architecture and microarchitecture?

I am studying computer architecture. I would like to know the difference between the terms "computer architecture" and "microarchitecture".
user avatar
  • 61
7 votes
2 answers
1k views

Why is word-addressable the exception, not the rule?

As stated on Wikipedia: Most modern computers are byte-addressable instead of word-addressable. Why is this case? Since the CPU processes words (of predominantly 64 bits or 8 bytes) now, wouldn't ...
user avatar
  • 393
2 votes
0 answers
2k views

Will this address result in a cache hit or miss for these cache mapping functions?

The Problem: A CPU produces the following sequence of read addresses in hex.    Suppose the cache is empty to begin with and assuming an LRU replacement, determine whether each address ...
user avatar
0 votes
0 answers
87 views

Is this cache entry a hit or a miss? [duplicate]

The Problem: A CPU produces the following sequence of read addresses in hex. Suppose the cache is empty to begin with and assuming an LRU replacement, determine whether each address produces a hit or ...
user avatar
63 votes
2 answers
27k views

What happens to the cache contents on a context switch?

In a multicore processor, what happens to the contents of a core's cache (say L1) when a context switch occurs on that cache? Is the behaviour dependent on the architecture or is it a general ...
user avatar
  • 1,287
24 votes
5 answers
302k views

How to calculate the number of tag, index and offset bits of different caches?

Specifically: 1) A direct-mapped cache with 4096 blocks/lines in which each block has 8 32-bit words. How many bits are needed for the tag and index fields, assuming a 32-bit address? 2) Same ...
user avatar
  • 403
16 votes
4 answers
4k views

why do CPU architectures use a flags register (advantages?)

Some CPUs have a flags register (ARM,x86,...), others don't (MIPS,...). What's the advantage of having a CMP instruction to update the flags register followed by a branch instruction instead of using ...
user avatar
3 votes
2 answers
6k views

Is word size, the size of a memory location? the size of the data bus? or the cpu register size?

Is word size, the size of a memory location? the size of the data bus? or the cpu register size? Suppose you have a computer, memory address #0 has byte AB memory address #1 has byte F3 memory ...
user avatar
  • 179
2 votes
2 answers
20k views

Differences between SISD, SIMD and MIMD architecture (Flynn classification)

I have a problem with classifying certain CPUs to the proper classes of Flynn's Taxonomy. 1. Zilog Z80 According to this article on Sega Retro, Z80 has limited abilities to be classified as SIMD: ...
user avatar
0 votes
2 answers
15k views

calculate the effective (average) access time (E AT) of this system

A computer with a single cache (access time 40ns) and main memory (access time 200ns) also uses the hard disk (average access time 0.02 ms) for virtual memory pages. If it is found that the cache hit ...
user avatar
  • 29
4 votes
2 answers
567 views

Why is Computer Architecture in $2^n$ bits?

I have always wondered why is computer architecture in $2^n$ bits. We have 8 / 16 / 32 / 64-bit microprocessors or for that matter other parts of computer are also in power of 2 bits. The only logic ...
user avatar
  • 215
2 votes
2 answers
2k views

What is the system's mean time to failure?

I have the following homework problem: A 10 TB disk drive has an MTTF of 6,000,000 hours. How much data can we store in a system comprised of these disks, if we want the system MTTF to be at least 1....
user avatar
2 votes
1 answer
2k views

Will ternary computers be faster than binary? [duplicate]

If we had a computer in base 3 which used the characters {0, 1, 2} instead of just {0, 1} (and we implemented a ternary logic on ...
user avatar
  • 123
2 votes
1 answer
199 views

Is there code below microcode?

Which is the lowest level of code (human written instruction for computers) in computer architecture? After doing minor research, I have come to the conclusion that, as far as determining a hierarchy ...
user avatar
1 vote
1 answer
2k views

What is happening in this part of the LC3? [closed]

This is a diagram of the LC3 Computer I am trying to understand what is happening in the parts I highlighted. The part I had highlighted had the instruction bit sign extended to 16 bits and then ...
user avatar
0 votes
2 answers
407 views

Address bus and memory

If I have an address bus of 64K, i.e. it can access 64*1024 or 65536 locations, should I also have a memory chip with 65536 locations in it? What I'm trying to ask is that do all the 65536 locations ...
user avatar
  • 303
0 votes
1 answer
31 views

What are the width of data/control/address bus for a 32-bit CPU?

Are they exactly 32bits for a 32-bit CPU?
user avatar
  • 103
92 votes
13 answers
24k views

What are GPUs bad at?

I understand that GPUs are generally used to do LOTS of calculations in parallel. I understand why we would want to parallelize processes in order to speed things up. However, GPUs aren't always ...
user avatar
57 votes
7 answers
31k views

Why does a processor have 32 registers?

I've always wondered why processors stopped at 32 registers. It's by far the fastest piece of the machine, why not just make bigger processors with more registers? Wouldn't that mean less going to the ...
user avatar
25 votes
12 answers
17k views

Is a universal assembly language for all computers possible?

I would like to ask a few questions about Assembly language. My understanding is that it's very close to machine language, making it faster and more efficient. Since we have different computer ...
user avatar
  • 449
15 votes
1 answer
21k views

How does a TLB and data cache work?

I'm trying to study for an exam and I realized I'm confused about how the TLB and data cache work. I understand that the TLB is essentially a cache of most recently used physical addresses. However, ...
user avatar
38 votes
2 answers
2k views

Are generational garbage collectors inherently cache-friendly?

A typical generational garbage collector keeps recently allocated data in a separate memory region. In typical programs, a lot of data is short-lived, so collecting young garbage (a minor GC cycle) ...
user avatar
24 votes
7 answers
14k views

Why floating point representation uses a sign bit instead of 2's complement to indicate negative numbers

Consider a fixed point representation which can be regarded as a degenerate case of a floating number. It is entirely possible to use 2's complement for negative numbers. But why is a sign bit ...
user avatar
  • 341
20 votes
9 answers
4k views

Would it be wrong to say that the processor (and hardware) is the implementation of an interpreter for machine language?

The question is basically in the title. I know that a computers hardware is of course some physical object, where as the interpreter is some abstract thing that does something abstract with the code ...
user avatar
8 votes
2 answers
21k views

Changing from Kernel mode to User mode (and vice versa)

I am reading Operating Systems book by Galvin. Galvin explains, what are kernel & user modes, instruction privileges given for both modes & also about mode-bit. But I am interested to know how ...
user avatar
  • 1,443
7 votes
2 answers
12k views

What is instruction throughput and instruction latency?

I was reading an article on an alternative method of modulo reduction and i couldn't understand the following excerpt (Those in bold) : "A single 32-bit division on a recent x64 processor has a ...
user avatar
9 votes
4 answers
10k views

Why do we need so many transistors in a chip, and how are they managed?

My knowledge is very vague as all we have are visual diagrams etc, but we have memory address and registers, the ALU being the heart(apparently). Single core CPUs process one instruction at a time ...
user avatar
  • 191
7 votes
1 answer
3k views

Why is a superscalar processor SIMD?

From http://en.wikipedia.org/wiki/Superscalar In Flynn's taxonomy, a single-core superscalar processor is classified as an SIMD processor (Single Instructions, Multiple Data), Flynn's taxonomy ...
user avatar
  • 1
21 votes
3 answers
1k views

Are today's massive parallel processing units able to run cellular automata efficiently?

I wonder whether the massively parallel computation units provided in graphic cards nowadays (one that is programmable in OpenCL, for example) are good enough to simulate 1D cellular automata (or ...
user avatar
19 votes
6 answers
3k views

How can I academically say that 'one computer is slower than the other'?

I'm writing a research paper and I have to basically say that one microcontroller is slower than an other microprocessor. However, I'm worried that simply saying that it's 'slower' wouldn't be ...
user avatar
7 votes
11 answers
11k views

Who converts binary/machine code to electrical signals and how?

I went through lots of blogs and posts but could not exactly figure out how the machine code is converted to electrical signals? Any software program is compiled to machine code which is nothing but ...
user avatar
  • 171
4 votes
3 answers
11k views

Difference between memory access and write-back in RISC pipeline

I'm a little confused about the difference of the memory access and the write-back stage in a RISC pipeline. We learned in class these following assumptions: <...
user avatar
3 votes
3 answers
8k views

Moore's law and Clock Speed

This figure says according to moore's law number of transistors doubles about two years. but clock speed, power flattening after given stage. can anyone describe the reasons this flattening in clock-...
user avatar
  • 155
22 votes
4 answers
5k views

CPU frequency per year

I know that since ~2004, Moore's law stopped working for CPU clock speed. I'm looking for a graph showing this, but am unable to find it: most charts out there show the transistor count or the ...
user avatar
  • 323
13 votes
2 answers
4k views

Do computers actually use carry-lookahead adders?

There are plenty of details about carry lookahead adders such as Kogge-Stone, Lander-Fischer, etc. in college CS courses. They are described as "common in the industry". However, I can't find any ...
user avatar
  • 543
2 votes
2 answers
537 views

Why does x86 has explicit register definitions, and RISC's doesn't?

For example, on x86, we have a set of general registers, each named to the function it carries out. We have an Accumulator, which is a storage for a results of different fixed point operations, we ...
user avatar
  • 123
14 votes
1 answer
395 views

Research on evaluating the performance of cache-obliviousness in practice

Cache-oblivious algorithms and data structures are a rather new thing, introduced by Frigo et al. in Cache-oblivious algorithms, 1999. Prokop's thesis from the same year introduces the early ideas as ...
user avatar
  • 22.1k
9 votes
3 answers
1k views

Why is the CPU Involved During Keyboard Echo?

I'm currently studying for a computer science exam, and I've come across a concept that has me somewhat stumped. When one types a key on the keyboard, an ASCII character is transmitted to the CPU. ...
user avatar
  • 93
6 votes
3 answers
1k views

Where should I start to understand how computers work? [duplicate]

I am interested in how computers work but I have no idea how the concept of 0's and 1's converts to making possible for people to control a computer by programming. I would like to understand from ...
user avatar
  • 71
6 votes
3 answers
5k views

What is Simultaneous Multithreading

I come from an electronics background. I know that there are three types of implementations of multithreading (see Computer Architecture: A Quantitative Approach, 5th Edition): Fine-grain ...
user avatar
3 votes
3 answers
5k views

How exactly the "load word" instruction loads from RAM?

PS: MIPS architecture This is a model of a memory RAM of 4GB: it has 4,294,967,295 addresses, and each address has 32 bits. Can somebody tell me why the load word instruction needs an offset to the ...
user avatar
2 votes
2 answers
707 views

Explanation for indirect addressing

While reading about minimal instruction set computer I found out that one needs at least (for example) the ability to increment or decrement the value stored in register, a test for zero and a jump. A ...
user avatar
  • 250
1 vote
3 answers
959 views

How is a program stored before compiling?

When we write code, after compilation the code will be converted to machine language and then stored in the hard disk. But before compiling the code, it is still in the high-level language. How and ...
user avatar
  • 119
8 votes
1 answer
22k views

What is the exact difference between a latch & a flipflop?

From what I have understood : A Flip Flop is a clocked latch i.e. flip flop = latch + clock Latch continuously checks for inputs & changes the output whenever there is a change in input Flip Flop ...
user avatar
  • 1,443