Questions tagged [alu]

ALU is the acronym for arithmetic and logic unit. This circuit performs arithmetic and logic operations in a processor.

Filter by
Sorted by
Tagged with
18
votes
6answers
12k views

How to find out if a binary number is zero

I was implementing the ALU from the specs given in my The Elements of Computing systems book. I am stuck on only one problem. How do I find if a given number is zero or not. One thing I can do is or ...
11
votes
8answers
6k views

How are most ALUs built, and is it possible to 'build your own'?

I've been REALLY really trying to learn about the very low level of computers. I've been looking at a lot of homebrew pages and it's quite a lot to take in. I took classes in electronic engineering in ...
3
votes
4answers
4k views

How does a chip interpret different opcodes?

I have learnt in school about opcodes and how it works with the ALU to add numbers and such, now is my question how the computer is able to understand this, because it is codes and the computer needs ...
4
votes
3answers
1k views

Why All 1's used as a second input in decrement operation of ALU?

Suppose the first four data inputs are X (X0, X1, X2, X3) and the second four data inputs are Y (Y0, Y1, Y2, Y3) in a 4-bit ALU. Why "All 1's" are used as an input for Y in the decrement operation of ...
39
votes
6answers
7k views

Why does Intel's Haswell chip allow floating point multiplication to be twice as fast as addition?

I was reading this very interesting question on Stack Overflow: Is integer multiplication really done at the same speed as addition on a modern CPU? One of the comments said: "It's worth nothing ...
2
votes
2answers
561 views

Looking for a open-source ALU

I am looking for a open ALU to compute several equations like these: y1 = e^((constant1 - x)^2/(2*x)) y2 = constant2/y1 y3 = y2*constant3 + x*constant4 Where x ...
1
vote
4answers
2k views

74181 ALU not working properly cascaded to add 8 bit numbers

I'm trying to make a homebrew CPU but having problems with the 74LS181 ALU, which I'm simulating in Logisim software before diving into real ICs and breadboards. I've cascaded two 74181 following ...
8
votes
2answers
5k views

Are 32-bit ALUs really just 32 1-bit ALUs in parallell?

I'm reading the high esteemed text Computer Organization where this picture is found that is supposed to represent a 32-bit ALU: Is this technology really how it's done, just a lot of 1-bit ALUs, so ...
2
votes
2answers
327 views

How are irrational numbers best represented and processed by computers?

My question is closely related to this one: How do computers understand decimal numbers? However, that question deals with rational numbers only. I was wondering if irrational numbers can be ...
1
vote
2answers
207 views

ALU,RAM and ROM test for LPC 1778

Im working on a non safety project and as part of the Initialization tests I wanted to check the internal memory of LPC1778 for proper functionality before beginning the application. I dont intend to ...
1
vote
1answer
175 views

How do you reduce an 8 output ALU to a 4 or 3 output ALU?

I can implement the functions in the picture below, but then if I implement them independently, I would have 8 outputs to the mux. Our professors wants us to reduce the ALU to only 3 or 4 outputs, I ...
1
vote
2answers
3k views

Designing a 8 bit ALU

I have started designing a 4 bit Arithmetic and logic unit. The sample image is as follows: The function Table: My question is: Is it possible to design an 8 bit ALU having the same ...
0
votes
1answer
59 views

In a CPU, how are LU inputs/outputs controlled and fed back to registers?

Basic problem: CPU instruction chooses which register to feed into a LU (such as an ALU), which then outputs a number somewhere and fed back into a register. But sometimes you want to feed the answer ...
0
votes
1answer
20k views

Verilog 8 Bit ALU

Here's what I have so far but I'm stuck with what to do for the f values for the last two and whether the if statement syntax is correct. Any tips? ...