Questions tagged [computer-architecture]
Questions about the organization and design of computer hardware.
1,073
questions
-3
votes
0
answers
25
views
design circuit by proteus
Design a circuit by which 3 4-bit numbers B, A and C are added together according to the control signal S and in
If the calculation result exceeds 15, the LED will be turned on as an output (it is ...
1
vote
1
answer
15
views
How is the memory address structured when the number of blocks per cache set is not a power of 2?
When it comes to defining the memory address structure given the RAM size, cache size, and other parameters such as the cache block size..., we can have the following generalization:
$$Address = TAG|...
0
votes
3
answers
107
views
Why does a 32 bit address only contain 1 byte, when 32 bits = 4 bytes?
I am really confused about it. I think 32 bits = 4 bytes but 32 bit address is only 1 bit.
0
votes
0
answers
47
views
Why does the branch instruction stall at fetch?
Here is a problem (C.1.c) from the famous Hennessey & Patterson book
I'm struggling with. The following code fragment should be scheduled
on a five-stage MIPS CPU with "full forwarding and ...
-2
votes
1
answer
44
views
How a computer works?
I know that a computer can be mechanical, screws/nuts or even water/pipes. Of course, it would be slow and big, but it doesn't have to be electric, transistors, etc. How can a machine like this do all ...
0
votes
1
answer
69
views
Within the set of signed integers representable by a bit string of length n, are any two elements equivalent to each other mod 2^n?
Donald Knuth's The Art of Computer Programming, Volume 1 Fascicle 1 contains the following exercise:
If $\alpha$ is any string of 0s and 1s, let $\operatorname{s}(\alpha)$ and $\operatorname{u}(\...
2
votes
1
answer
52
views
How does caching, paging, virtual memory, and OS all tie together for UNIX copy-on-write?
In my OS course, the instructor mentioned the following: In UNIX if a parent process creates a new child ("fork") then the child is an exact duplicate of the parent. This means its memory ...
3
votes
1
answer
80
views
How efficient is register renaming?
As I understand, all modern CPUs perform register renaming: given a sequence of instructions to interpret, they check which registers these instructions use, detect patterns where a register's ...
0
votes
0
answers
20
views
CPU limit for bitap algorithm bitmask
We have bitap (shift OR) algorithm that searches for a substring in a text.
Bitap algorithm uses bit masks, so that it can perform bitwise operations very fast with the help of CPU.
For example:
...
1
vote
3
answers
85
views
Is this how endianess work relative to memory?
So I've been trying to understand endianess for the past couple of days but I'm not sure if I'm overthinking this or not and I don't have anyone I can ask to confirm things.
Here is how I look at ...
1
vote
4
answers
187
views
Is the reason for a stack to decrease the size of a program (by adding the use of subroutines)?
The stack allows subroutines to be used. It can store return address for "return from subroutine" instruction (RTN) and also arguments for the function.
It is not possible to store return ...
0
votes
0
answers
25
views
Help with a question on write-through and no-write allocate in caches
I am struggling with this question as I am not sure whether the answer that has been provided is correct or not. The image should be sufficient to tell the question.
The attached image is of the ...
0
votes
0
answers
26
views
What is my mistake in applying the division algorithm using subtract and shift?
The following division hardware is from computer organization and design RISC-V 2nd edition 2020, section 3.4.
Using this hardware and its related algorithm, I want to calculate 43 / 2. I use 6 bit ...
0
votes
1
answer
68
views
To where is the mouse sending signals of a computer?
When we move the mouse, we can see the cursor moving on the monitor. I know that mouse can send signals according to its movements. Which component of a computer is receiving those signals in the ...
0
votes
0
answers
26
views
Von Neumann Architeture
Recently I came across with a question about Von Newman architecture (which is usually used) and whether the following statement is true or not?
In Von Neumann architecture data are stored in disk and ...
-1
votes
1
answer
134
views
Perform subtraction micro operation R3←R1-R2 where R1=1011 and R2=1100
From tutorials point:
Subtract micro-operation are using minus operator we create 1's complement and add 1 to the register which obtains subtracted, i.e R1 - R2 is similar to R3 → R1 + R2' + 1
$$
R2'...
0
votes
2
answers
37
views
How many bits are needed to reference physical vs virtual addresses?
I trying to learn about virtual memory at the moment and one of the explanations I've look at has a diagram like below. You can see that 32 bit virtual addresses are used so the virtual address space ...
0
votes
1
answer
25
views
K-Maps (Digital Logic, Computer System Architecture)
While i was going thru my course in Computer System Architecture (book taken Morris Mano) , I saw a question on KMaps can be solved in either of the ways but couldn't get which one to use when :-
I’m ...
0
votes
2
answers
58
views
Are variables stored again in RAM?
Assuming this set of instructions:
declare variable 'A' which has value 5
declare variable 'B' which has value 2
From what I've understood, those instructions are loaded into RAM an then read by CPU,...
9
votes
2
answers
2k
views
Why is static recompilation not possible?
I'm researching static recompilation but there doesn't seem to be too much information about the subject. I've heard that dynamic recompilation (emulation) can be up to 6 times slower than native ...
0
votes
2
answers
76
views
What is the most critical component of a processor? [closed]
We know that there are basically 3 fundamental parts of a processor namely :
Control Unit (CU)
Arithmetical Logic Unit (ALU)
Clock
Also we know that they maintain several important and different ...
1
vote
0
answers
32
views
Tomasulo's Algorithm: Is there one reservation station per functional unit?
In Tomasulo's algorithm, is there only one reservation station per functional unit (even with multiple same-function FUs like, say, 3 adders)? Can there be more?
1
vote
1
answer
141
views
Page/Frame VS Block
I am bit confused on these terminologies.
While studying Paging of Operating System we study about Page and Frame.
Size of one Frame of Main Memory = Size of one Page of a Process
While studying ...
0
votes
0
answers
21
views
Is the memory layout actual or virtual?
In many computer architecture books (e.g. Computer Organization and Design), the memory layout that is seen by a program is as the following figure.
But I wonder about multitask computers, in which ...
0
votes
2
answers
100
views
If a process needs more RAM, does the Page size simply get bigger or does it get a new page?
Let's say I have a Operating System with 4KB page size, but I need to allocate 8kb of memory for all the variables. Does the Process get new page (second one) or does the current page table simply get ...
1
vote
2
answers
61
views
What happens in harvard architecture pipelining if cpu needs to write data and fetch data at the same time?
What happens if Operand Fetch and Write Back happen in same cycle?
0
votes
1
answer
30
views
Formal proof for in-balanced pipeline throughput
It is a well known fact, the throughput of a given compute pipeline (say, CPU instruction pipeline) is determined by its "slow" segment.
All the resources I've seen so far, demonstrates this ...
0
votes
0
answers
42
views
Risc v Instruction format
Why do you think the Immediate type instructions are limiting its immediate values to only 12 bits, while upper immediate type instructions can handle immediate values of 20 bits.
0
votes
0
answers
38
views
Understanding the faster multiplication hardware in riscv
I found a one question I wonder, but there is something to be clear about.
The link is https://electronics.stackexchange.com/questions/56488/parallel-multiplication-hardware/56518#56518
Q1. In his ...
0
votes
2
answers
71
views
What is a procedure?
Non-computer scientist here, trying to understand what SICP (Structure and Interpretation of Computer Programs) means by a procedure, whether it matches the dictionary definition, and also how a ...
0
votes
1
answer
398
views
How does instruction set architecture affects clock rate?
According to the computer organization and design RISC-V 2nd edition 2020, section 1.5, the following table states that ISA affects clock rate.
Hardware or software component
Affects what?
How?
...
1
vote
1
answer
28
views
Solving an ambiguity concerning unsigned and signed integers [duplicate]
I am taking a class in computer science and I am not sure about the following. When one transforms $247_{10}$ into its binary counterpart one gets $11110111_2$. However, the same binary number ...
0
votes
2
answers
56
views
translating operations per second (OPS) to floating point operations per second (FLOPS)
I have some algorithmic complexity estimates in Giga Operations Per Second (GOPS) and I would like to compare those with the capabilities of state-of-the-art processors. However, the processor ...
0
votes
2
answers
90
views
Is assembly macros part of operative system / kernel, or lower down and more seen as hardware?
Update: To clarify. MyNOR (http://mynor.org/) stores some combined instructions in ROM to make programs take up less space. It seems very possible that instruction sets for CPUs might do similar, in ...
0
votes
0
answers
47
views
How hardware write a byte in memory?
I want to know how hardwares write a byte in memory?
If there is difference between writing process in RAM and ROM I would like to know as well.
Specially I want to know:
Is hardware writes values ...
0
votes
1
answer
163
views
Why do computers become slow over time (HW PoV)?
I'm a SW engineer. I'm just curious why computers become slow over time.
"Slow" here I mean from a usual user PoV:
It takes more time to launch an application.
Application UI takes longer ...
0
votes
1
answer
51
views
Is kernel essentially an implementation of system calls?
In essence, is kernel basically the code that implements a set of system calls?
0
votes
3
answers
823
views
Execution Time in Stage Pipeline
Exam Question:
A five-stage pipeline has stage delays of 150,120,150,160 and 140 nanoseconds. The registers that are used between the pipeline stages have a delay of 5 nanoseconds each.
The total time ...
0
votes
0
answers
22
views
How to do signed 16-bit arithmetic on an 8-bit processor?
For example, to add two 16-bit numbers on my 8 bit machine, I add the low bytes together, then the high bytes together, and then add the carry flag to the high byte of the output.
This strategy falls ...
0
votes
1
answer
181
views
compute cache miss rate by given code
I have been trying to solve questions like this before but I have stumbled in difficulty to track the the space of the cache.
so there is an example of a question like this:
Given the code:
...
1
vote
1
answer
42
views
Is the executable always loaded to the same place in the text segment?
I am reading a book about data architecture, and I am wondering about the text segment and the memory adresses.
In one example(assembly using ARM) where the code was compiled there were adresses to ...
0
votes
0
answers
13
views
Reference/notes for introduction to (von Neumann) architecture
I am interested in understanding what we mean by a von Neumann architecture and need something at a very introductory level. Does anyone know of any good and readable references or notes that will ...
1
vote
0
answers
25
views
What does it mean to have the processor ignore interrupt request line?
I was reading a textbook on COA, it says
If the processor is going to ignore the interrupt request line till the execution of the first instruction of the ISR, how will it know which device to ...
0
votes
1
answer
71
views
Page fault question
How many page faults are there in the following accesses of pages in case of FIFO mechanism where page frame size is 8?
$$11,21,23,53,8,7,10,3,3,38,3,37,7$$
Soln: This question appeared in one of my ...
1
vote
1
answer
102
views
Are really only ~1% of the physical CPU space used for computing
In a Talk by Herb Sutter C++ and Beyond 2012: Herb Sutter - atomic Weapons 1 of 2 at 46:30 the point is made that only around 15% of the physical space (or the transistors) on a CPU do actual ...
0
votes
2
answers
90
views
How do we run programs which are bigger than RAM itself
I know that whenever click on .exe, it will be moved into RAM so cpu can execute machine code line by line. But what if .exe is bigger than RAM?
for eg: I play games which take up more space than my ...
2
votes
0
answers
41
views
Belt-based mechanical computers
I've seen a lot of mechanical computers based on gears and rigid rods, but none so far that consequently use belts (not chains) for transmission of information.
Belts allow for easy negation (by ...
0
votes
0
answers
42
views
Resources to learn about the fundamentals of computers? [duplicate]
I have been wanting to learn more about how computers work. Getting way ahead of myself, but as in would it be possible to build a computer from scratch by myself? I mean build the individual parts ...
8
votes
13
answers
6k
views
Why do we rely on computers in critical fields?
I assume that computers make many mistakes (like errors, bugs, glitches, etc.), which can be observed from the amount of questions asked everyday on different communities (like Stack Overflow) showing ...
0
votes
0
answers
47
views
How many CPU cores are there in the world?
I have read some articles about how much total storage capacity there is in the world (eg. https://www.quora.com/Whats-the-worlds-total-data-storage-capacity), and I wondered how many CPU cores are ...