Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

how many bit are require to make ALU

Status
Not open for further replies.

jidan

Member
I want design ALU that make with arithmetic unit and logical unit (just for paper work)
ALU should perform following operations
AND logic
OR logc
NOT logic
ADDITION
SUBTRACTION
I am making arithmetic unit with adder and subtractor and logic unit with AND OR NOT Ic
I don't understand the concept of bits It will become 4 bits or 8 bit ALU
does anyone explain how to decide bit of ALU
 
The length can be anything.
The smallest I have used is one. That device is usually paralleled to get any length you want.
ALUs can be 4. I have used 4 bite computers. Works well for numbers but not text.
8 bit is better, it can do text.
From there 16, 32 and 64. There is really no need for a even number like 16. 15 or 14 will work.
What type of data?
There are building blocks in hardware that are 4 bit and 8 bit so start with 4 or 8.
 
The length can be anything.
The smallest I have used is one. That device is usually paralleled to get any length you want.
ALUs can be 4. I have used 4 bite computers. Works well for numbers but not text.
8 bit is better, it can do text.
From there 16, 32 and 64. There is really no need for a even number like 16. 15 or 14 will work.
What type of data?
There are building blocks in hardware that are 4 bit and 8 bit so start with 4 or 8.
Is it right that 4 bit ALU means its capable operation of 4 bit It can store 4 bit data and 8 bit ALU means its capable operation of 8 bit means It can be store 8 bit data
 
4-bit ALU can deal with numbers from 0 to 15
8-bit ALU can deal with numbers from 0 to 255
16-bit ALU can deal with numbers from 0 to 65536

and so on ...

Pick the largest number you want. This will decide the size of ALU.
 
4-bit ALU can deal with numbers from 0 to 15
8-bit ALU can deal with numbers from 0 to 255
16-bit ALU can deal with numbers from 0 to 65536

and so on ...

Pick the largest number you want. This will decide the size of ALU.
ok its mean If i make 4 bit ALU it work only for 4 operations like additions, subtraction, AND logic OR logic
and IF I make 8 bit ALU it work only for 8 operations like add sub AND OR NOT NAND NOR XOR
Is it right
 
No, it will do as many operations as you want. The size of ALU is the size of the numbers it can process, not how many different operations it can do.
 
Most people have a 4 bit cpu in their head. 4 bit means you can only think about small numbers. For a person 0 through 9. For a computer (4 bit) 0 through F or 0 through 15. so.....
A person can add 3+4=7.
A person will add 12+34=....... 2+4=6, 1+3=4, 40+6=46
Most people can not add 12+34= with out breaking it down into steps. A 8 bit person can directly add these numbers in one thought.
A 4 bit computer or person will have to think long and hard to add 1234+5678 by using many small steps. A 16 bit computer can do this on one instruction.
 
It means the 2 bit ALU perform 4 operations, 4 bit ALU perform 16 operations and 8 bit ALU perform 256 operations
what is mean by mode control input
 
It means the 2 bit ALU perform 4 operations, 4 bit ALU perform 16 operations and 8 bit ALU perform 256 operations
what is mean by mode control input
No it does not. The "size" of ALU or number of bits is the size of tha DATA it can process. You can have a 2-bit ALU controlled by an 8-bit control word, thus giving you 256 possible operations with those 2bit operands.
Of course, two 2bit inputs and one 2bit output only give you at most 4*4*4=64 different combinations of inputs-to-output, but that is another story.

The same way, you could have a 16bit alu that only can do addition and subtraction, so it is controlled by a single bit.
 
No it does not. The "size" of ALU or number of bits is the size of tha DATA it can process. You can have a 2-bit ALU controlled by an 8-bit control word, thus giving you 256 possible operations with those 2bit operands.
Of course, two 2bit inputs and one 2bit output only give you at most 4*4*4=64 different combinations of inputs-to-output, but that is another story.

The same way, you could have a 16bit alu that only can do addition and subtraction, so it is controlled by a single bit.
ok what is control word
 
Control word basically is the set of wires that tell the ALU what to do with the data.
 
The simplest ALU performs around 5 functions... ADD, OR, AND, XOR etc... The amount of control depends on the complexity of the ALU..

If you had 5 functions... You need at least three control wires.... 001, 010, 011, 100, 101...
 
The simplest ALU performs around 5 functions... ADD, OR, AND, XOR etc... The amount of control depends on the complexity of the ALU..

If you had 5 functions... You need at least three control wires.... 001, 010, 011, 100, 101...
ALU should perform following operations
AND logic
OR logc
NOT logic
ADDITION
SUBTRACTION
how many control wire i need to perform above function
 
It goes back to how many numbers or in case patterns you can represent in n bits. We know that is a power of 2 thing.

0:1 (always do the same thing)
1:2 (0 do one thing, 1 do the other)
2:4 (4 patterns so 4 things, 00, 01, 10, 11)
3:8
4:16
5:32
6:64
7:128
8:256

To decode for 5 operations you need 3 bits (if you use 4 bit data and that is ok, it just means that each 4 bit word has one bit that does not effect the instruction decode. We call that a DC or Don't Care often show with an X).

Build a demultiplexer/decoder. For your use a 3:8 decoder would work. Each of the outputs in the table below it the enable line for one operation.
02__3-to-8_Decoder_TruthTable.jpg


There are other ways to look at this but this may be the easiest to understand.
 
Status
Not open for further replies.

Latest threads

Back
Top