Questions tagged [alu]

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

167 questions
39
votes
6 answers

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 that on Haswell, the FP multiply throughput is double…
Nike Dattani
  • 547
  • 7
  • 22
32
votes
2 answers

How do computers calculate sin values?

How does a computer calculate a sin value? Logically, when I think about it the only apparent way is to put many sin values into memory, and when a sin value needs to be "calculated" it would just pull data from a specific memory address.(ex. sin(x)…
zack1544
  • 787
  • 1
  • 12
  • 24
31
votes
9 answers

What is the process of going from machine code to electrically controlling individual transistors?

For someone who writes software but doesn't have a computer engineering background, the dozens of abstraction layers have always bewildered me. I know all source code in their most fundamental level is broken down into 1s and 0s. I also know all…
18
votes
7 answers

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 every bit in the bus, and then apply a not gate on…
Rick_2047
  • 3,897
  • 5
  • 46
  • 68
13
votes
8 answers

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 college, but we didn't really go into super…
user3073
11
votes
3 answers

does 8085 CPU have an extra register within ALU?

From the 8085 CPU architecture, when ALU done calculation, the result is clocked back to accumulator A on next clock edge. But accumulator A is directly wired as ALU input, what if the clock edge didn't raise fast enough to cause A is being added…
starx
  • 161
  • 6
10
votes
3 answers

How are various functions (eg. add, subtract, and, etc) implemented in ALU?

I am wondering since there are so many functions an ALU need to do, how might I start implementing one (a homework where I am supposed to implement a MIPS system with Logisim, using basic Gates, Flip-flops etc). The part I am confused about is how…
Jiew Meng
  • 569
  • 2
  • 12
  • 21
8
votes
3 answers

Designing a simple ALU

I need to design an ALU with two 8-bit inputs A and B and control inputs x, y, and z that supports the following operations: x y z | operation 0 0 0 | S = A-B 0 0 1 | S = A+B 0 1 0 | S = A*8 0 1 1 | S = A/8 1 0 0 | S = A NAND…
norman
  • 307
  • 1
  • 3
  • 8
8
votes
2 answers

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 a 64 bit ALu would just be 64 1-bit ALUs in…
Niklas Rosencrantz
  • 1,694
  • 6
  • 33
  • 62
7
votes
3 answers

For a mathematical operation in CPU, could power consumption depend on the operands?

Obviously, the number of operations affect a CPU's power consumption, but does it solely depend on the operations themselves? For example, adding 0 and 1 involves setting one single bit, but adding 0xFF and 1 requires clearing 8 bits and setting one…
polfosol
  • 227
  • 2
  • 8
6
votes
1 answer

What is meaning and significance of locally decrementing SP (Stack Pointer)?

What is meaning of line "SP (Stack Pointer) can be decremented locally" *I am not asking the answer of the whole question in the image.
Rajan
  • 171
  • 5
6
votes
1 answer

Parallel multiplication hardware

This picture is taken from Computer Organization and Design, Fourth Edition, David A. Patterson, John L. Hennessy. Sorry for the low resolution. I cannot get my head around it. I can see why the bits to the right become lsb's in the product…
6
votes
2 answers

What does the logic statement "F = AB" mean? Bitwise A AND B?

On an ALU data sheet there are logic formulae showing the results that will be output for various inputs. http://www.farnell.com/datasheets/1840939.pdf (Second from last row on page 3.) I assume that A+B means bitwise A OR B, this would follow, as…
fadedbee
  • 994
  • 9
  • 24
5
votes
1 answer

Creating an ALU slice with 8 operations

Hey, I'm trying to implement a 4bit ALU based on this 8bit alu design. The ALU has 8 different operations, given by an input of X Y Z The 8 operations are (edit: the last one is just A not, made a typo) I'm pretty lost as to how to start on the…
5
votes
7 answers

Is an ALU a multiplexer?

I'm studying digital electronics where the components ALU and multiplexer appear. To me the ALU seems like a multiplexer but it's not specifically mentioned that this is the case. Is it so, or why not?
Niklas Rosencrantz
  • 1,694
  • 6
  • 33
  • 62
1
2 3
11 12