Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 10

EXPERIMENT 1

AIM:
A. FACTORIAL OF A GIVE NUMBER USING FOR LOOP

B. SUM OF ‘n’ NATURAL NUMBERS USING WHILE LOOP

C. FACTORIAL OF A GIVE NUMBER USING WHILE LOOP

Apparatus Required:

LabVIEW Software

Algorithm1(A):

Step 1: Create blank VI.

Step 2: Right click on the block diagram panel, select program , go to structures and select a
FOR loop.

Step 3: Right click on the border of the FOR loop and select add shift register, borders are
converted into shift register.

Step 4: Using wiring operations required connections are given in the block diagram.

Step 5: Inputs are given in the front panel and the program is executed.

Algorithm1(B):

Step 1: Create blank VI.

Step 2: Right click on the block diagram panel , select program , go to structures and select a
FOR loop.

Step 3: Right click on the border of the FOR loop and select add shift register, borders are
converted into shift register.

Step 4: Using wiring operations required connections are given in the block diagram.

Step 5: Inputs are given in the front panel and the program is executed.

Algorithm1(C):

Step 1: Create blank VI.

Step 2: Right click on the block diagram panel , select program , go to structures and select a
WHILE loop.
Step 3: The tunnels of the border are converted to shift register.

Step 4: Generate an adder and greater than equal to inside the WHILE loop .

Step 5: Using wiring operation required wiring is done in the block diagram panel. Step 6:
Input values are given in front panel and the output is generated.

Simulation Result:

Fig 1(A): SUM OF ‘n’ NATURAL NUMBERS USING WHILE LOOP

Fig 1(B): FACTORIAL OF A GIVE NUMBER USING FOR LOOP


Fig 1(C): FACTORIAL OF A GIVE NUMBER USING WHILE LOOP

Conclusion:
Hence we have successfully studied and implementeda sine wave using formula node using
LABVIEW
EXPERIMENT 2
AIM:
A.FACTORIAL OF A GIVE NUMBER USING WHILE LOOP

B. SORTING EVEN NUMBERS USING WHILE LOOP IN AN ARRAY

C. ARRAY MAXIMUM AND MINIMUM

Apparatus Required:

LabVIEW Software

Algorithm2(A):
Step 1: Create blank VI.

Step 2: Right click on the block diagram panel , select program , go to structures and select a WHILE
loop.

Step 3: Right click on the border of the WHILE loop and select add shift register, borders are
converted into shift register.

Step 4: Using wiring operations required connections are given in the block diagram.

Step 5: Inputs are given in the front panel and the program is executed.

Algorithm2(B):
Step 1: Create blank VI.

Step 2: Right click on the block diagram panel , select program , go to structures and select a WHILE
loop.

Step 3: Create an array in the front panel and add numeric indicator to it.

Step 4: Add the numeric control in the front panel.

Step 5: Using wiring operations required connections are given in the block diagram.

Step 6: Inputs are given in the front panel and the program is executed.

Algorithm2(C):
Step 1: Create blank VI.

Step 2: Right click on the front panel →modern →array→ array matrix→ numeric control.

Step 3: Create four numeric indicators in the front panel for maximum variable, index, minimum
variable and index.
Step 4: Using wiring operations required connections are given in the block diagram.

Step 5: Inputs are given in the front panel and the program is executed.

Simulation Result:

Fig 2(A): FACTORIAL OF A GIVE NUMBER USING WHILE LOOP

Fig 2(B): SORTING EVEN NUMBERS USING WHILE LOOP IN AN ARRAY


Fig2(C): ARRAY MAXIMUM AND MINIMUM

Conclusion:
Hence we have successfully studied and implementeda sine wave using formula node using
LABVIEW
EXPERIMENT 3
AIM:

Create a VI to design a 4:16 line decoder using 3:8 line decoder using
LabVIEW

Apparatus Required:

LabVIEW Software

Theory:
A decoder is a combinational circuit constructed with logic gates. It is the reverse of the
encoder. A decoder circuit is used to transform a set of digital input signals into an equivalent
decimal code of its output. For ‘n’ inputs a decoder gives 2^n outputs.

Fig1: Block diagram of Decoder

Circuit of 4:16 Decoder Using 3:8 Decoder

A decoder circuit of the higher combination is obtained by adding two or more lower
combinational circuits. 4 to 16 decoder circuits are obtained from two 3 to 8 decoder circuits
or three 2 to 4 decoder circuits.
When two 3 to 8 Decoder circuits are combined the enable pin acts as the input for both the
decoders. When enable pin is high at one 3 to 8 decoder circuits then it is low at another 3 to
8 decoder circuit.

Fig 2: Block diagram of 4:16 decoder using 3:8 decoder


Table 1: Truth Table of 4:16 decoder

E A B C Y0 Y1 Y2 Y3 Y4 Y5 Y6 Y7 Y8 Y9 Y10 Y11 Y12 Y13 Y14 Y15

0 0 0 0 1 × × × × × × × × × × × × × × ×
0 0 0 1 × 1 × × × × × × × × × × × × × ×
0 0 1 0 × × 1 × × × × × × × × × × × × ×
0 0 1 1 × × × 1 × × × × × × × × × × × ×
0 1 0 0 × × × × 1 × × × × × × × × × × ×
0 1 0 1 × × × × × 1 × × × × × × × × × ×
0 1 1 0 × × × × × × 1 × × × × × × × × ×
0 1 1 1 × × × × × × × 1 × × × × × × × ×
1 0 0 0 × × × × × × × × 1 × × × × × × ×
1 0 0 1 × × × × × × × × × 1 × × × × × ×
1 0 1 0 × × × × × × × × × × 1 × × × × ×
1 0 1 1 × × × × × × × × × × × 1 × × × ×
1 1 0 0 × × × × × × × × × × × × 1 × × ×
1 1 0 1 × × × × × × × × × × × × × 1 × ×
1 1 1 0 × × × × × × × × × × × × × × 1 ×
1 1 1 1 × × × × × × × × × × × × × × × 1

Applications of Decoders:

 In every wireless communication, data security is the main concern. The decoders are
mainly designed to provide security for data communication by designing standard
encryption and decryption algorithms.
 Decoders are used in audio systems to convert analogue audio into digital data.
 Used as a decompressor to convert compressed data like images and videos into
decompressed form.
 Decoders use electronic circuits which convert computer instructions into CPU
control signals.

Simulation Result:
Fig 3.1: Circuit diagram of 4:16 decoder

Fig 3.2: Block diagram of 4:16 decoder (when W=0, X=0, Y=0, Z=0)
Fig 3.3: Block diagram of 4:16 decoder (when W=0, X=1, Y=0, Z=1)

Conclusion:

Hence we have successfully studied and designed a 4:16 line decoder using 3:8
line decoder using LabVIEW

You might also like