Blog Page 10

What is an ALU?

0
computer architecture vs computer organization

ALU stands for “Arithmetic and Logic Unit”.

As it becomes pretty clear by the name, ALU is that part of the CPU ( central processing unit ) that deals with Arithmetic and Logic operations.
Note :

  1. ALU is a complex circuit that resides in the CPU ( the central processing unit ).
  2. In some processors, ALU is divided into two units, the AU known as the Arithmetic Unit , and the LU which is known as the Logic Unit.

Now that you know what an ALU actually is,lets get started with building a simple ALU that performs basic AND , OR operations . 🙂

How to make an ALU that performs AND , OR operations?

0
computer architecture vs computer organization

Today I am going to show you a simple and easy way to constructing your own little ALU ( ALU is the short form for : Arithmetic and Logic Unit ) .

To build an ALU that can perform AND,OR operations, simply follow the following steps:

Express sqrt{3}i – 1 in trigonometric or polar form

0

Q1.2

 

 

 

 

 

Similarly we can express the following complex numbers in trigonometric or polar form.

  • \sqrt{3} - i
  • - \sqrt{3} - i
  • - \sqrt{2} + 4i

Express 3 + 5i in Trigonometric and Polar form

0

Let z represent the complex number 3 + 5i. Hence we say that z = 3 + 5i.
Also we know that the polar form of a complex number ” z ” is:

r(cos(\theta)+ sin(\theta)i)

Where:

r = \sqrt{ a^{2} + b^{2} }

Solution:

r = \sqrt{ 3^{2} +  5^{2} }<br />
r = \sqrt{9 + 25}
r = \sqrt{34}
We know that :

tan(\theta) = y/x
\Rightarrow tan(\theta)=5/3
\theta =  tan^{-1}(5/3)
 \theta= 59^{\circ}

Hence Polar Form of 3 + 5i is:

 \sqrt{34}(cos(59^{\circ}) + sin(59^{\circ})i)

 

Similarly we can express the following complex numbers in trigonometric or polar form.

  • – 6 + 3i
  • 5 – 5i
  • – 10i

What are I-type Instructions?

0
computer architecture vs computer organization

I-type Instructions are also called Immediate instructions.

These instructions are used to load data from memory or store some data to the memory after we are finished performing some Arithmetic or Logic operation on that data.

Instruction Format:

This is the I-type Instruction format:

I-type_instruction_format

  • op stands for opcode and is used to identify the instruction type ( whether the instruction is R-type,I-type or J-type).
  • rs is a 5 bit and is called the source register.
  • rt is also 5 bit and is the destination register.
  • address (sometimes called immediate) in I-type refers to the address in memory where a load word instruction may load data , or, a store word instruction may store data e.t.c

What are R-type Instructions?

0
computer architecture vs computer organization

As the name refers, R-type instructions are instructions that make the use of registers. They are also called register type instructions.

This instruction class includes add, sub, AND, OR, and slt instructions.

Instruction Format:

This is R-type Instruction format:

R-type instruction format

  • op stands for opcode and is used to identify the instruction type ( whether the instruction is R-type,I-type or J-type).
  • rs is 1st source register.
  • rt is the 2nd source register.
  • rd specifies the destination register where the final output will be stored.
  • shamt stands for ‘Shift Amount’ and is used only for shift instructions.
  • func is used together with op to select an arithmetic instruction

Simplify i^15

0

 

The solution to this type of problem is really simple, all we need to know are these three key points :

  1. Remember that ” i power 2 ”  always equals to negative 1                                     i^2 = -1 .
  2. Just like in case of real numbers, we have i^1 = i for complex numbers.
  3. When we have to simplify a large power of i,we break the down the power to smaller  powers of 1 and 2 (that is i^1 and i^2 ) and then simplify using rule (1) and (2).

Solution:

What is a datapath?

0
computer architecture vs computer organization

A Datapath, in computer architecture, is a “collection of functional units” such as the ALU  or the multipliers.

ALU – Arithmetic and Logic Operations

Multipliers – Multipliers are units that perform data processing operations.There are two basic type of multipliers

  • Registers
  • Buses