Questions tagged [computer-architecture]

Questions about the organization and design of computer hardware.

Computer architecture is a branch of computer science that deals with the hardware aspects of computers including organization, structure, design, and implementation of hardware components and their combinations used in computers. The main goals relate to function, performance, cost, energy, and the formal modeling of those systems.

Topics in computer architecture include: physical structure of computer systems, organization of processors (superscalar, multithreaded), memory hierarchies, disks and I/O organization, control and sequencing (dynamic and static scheduling, speculative execution), shared-memory multiprocessors, multicomputers, distributed shared memory systems, and energy efficiency.

1162 questions
98
votes
13 answers

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 better than CPUs, as far as I know. What kinds of…
ChocolateOverflow
  • 1,153
  • 1
  • 9
  • 13
81
votes
3 answers

How do computers keep track of time?

How are computers able to tell the correct time and date every time? Whenever I close the computer (shut it down) all connections and processes inside stop. How is it that when I open the computer again it tells the exact correct time? Does the…
Soham
  • 947
  • 1
  • 7
  • 8
78
votes
9 answers

Why is addition as fast as bit-wise operations in modern processors?

I know that bit-wise operations are so fast on modern processors, because they can operate on 32 or 64 bits on parallel, so bit-wise operations take only one clock cycle. However addition is a complex operation that consists of at least one and…
67
votes
2 answers

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 behaviour followed by all chip manufacturers?
Ankit
  • 1,337
  • 2
  • 14
  • 18
58
votes
12 answers

Does a byte contain 8 bits, or 9?

I read in this assembly programming tutorial that 8 bits are used for data while 1 bit is for parity, which is then used for detecting parity error (caused by hardware fault or electrical disturbance). Is this true?
xtt
  • 729
  • 1
  • 5
  • 9
58
votes
11 answers

Why would anyone want CISC?

In our computer systems lecture we were introduced to the MIPS processor. It was (re)developed over the course of the term and has in fact been quite easy to understand. It uses a RISC design, that is its elementary commands are regularly encoded…
Raphael
  • 73,212
  • 30
  • 182
  • 400
58
votes
7 answers

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 RAM?
Matt Capone
  • 701
  • 1
  • 6
  • 5
52
votes
10 answers

If the speed of electrical charge hasn't changed, how have computers become faster?

Everyone knows computing speed has drastically increased since their invention, and it looks set to continue. But one thing is puzzling me: if you ran an electrical current through a material today, it would travel at the same speed as if you did it…
leylandski
  • 653
  • 6
  • 7
41
votes
6 answers

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 electricity and does something with it, and we just…
40
votes
7 answers

How does the computer determine whether a number is smaller or greater than another?

It might sound like a stupid question but I'm really curious to know how a computer knows that $1<2$? Also, how does a computer know that the order of integer is $1,2,3,4,5,\ldots$ and alphabet is A,B,C,D,...? Is it somewhere stored in the hardware…
Ricky Stam
  • 501
  • 1
  • 5
  • 7
38
votes
2 answers

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) frequently and collecting old garbage infrequently…
33
votes
2 answers

What are system clock and CPU clock; and what are their functions?

While reading a book, I came across a paragraph given below: In order to synchronize all of a computer’s operations, a system clock—a small quartz crystal located on the motherboard—is used. The system clock sends out a signal on a regular basis…
swdeveloper
  • 641
  • 2
  • 11
  • 17
30
votes
6 answers

Why are reversible gates not used?

I was reading the book "The singularity is near" written by Kurzweil and he mentioned the reversible gates like for example the Fredkin gate. The advantage using such gates is that we could get rid of the thermal waste related to computation where…
Mehdi
  • 453
  • 4
  • 6
29
votes
6 answers

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?
Rai Ammad Khan
  • 449
  • 1
  • 5
  • 6
28
votes
3 answers

What does the processor do while waiting for a main memory fetch

Assuming l1 and l2 cache requests result in a miss, does the processor stall until main memory has been accessed? I heard about the idea of switching to another thread, if so what is used to wake up the stalled thread?
102948239408
  • 283
  • 3
  • 4
1
2 3
77 78