-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathALU.cpp
More file actions
50 lines (34 loc) · 697 Bytes
/
Copy pathALU.cpp
File metadata and controls
50 lines (34 loc) · 697 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#include "ALU.h"
ALU::ALU(int noA, int noS, int noR, int sR) : NoOfAdders(noA), NoOfSubtractors(noS), NoOfRegisters(noR), sizeOfRegisters(sR) {}
void ALU::setNoOfAdders(int value)
{
NoOfAdders = value;
}
int ALU::getNoOfAdders() const
{
return NoOfAdders;
}
void ALU::setNoOfSubtractors(int value)
{
NoOfSubtractors = value;
}
int ALU::getNoOfSubtractors() const
{
return NoOfSubtractors;
}
void ALU::setNoOfRegisters(int value)
{
NoOfRegisters = value;
}
int ALU::getNoOfRegisters() const
{
return NoOfRegisters;
}
void ALU::setSizeOfRegisters(int value)
{
sizeOfRegisters = value;
}
int ALU::getSizeOfRegisters() const
{
return sizeOfRegisters;
}