digital electronics assignment example

11
8/18/2019 Digital Electronics Assignment Example http://slidepdf.com/reader/full/digital-electronics-assignment-example 1/11 ASSIGNMENT TITLE: DESIGN OF DIGITAL CALCULATOR SUBJECT: UEEA1323 DIGITAL ELECTRONICS  LECTURERS: Dr LEE KIM YEE / Mr YAP WUN SHE DATE OF SUBMISSION: GROUP MEMBERS:  Name ID Course Lecture Group 1

Upload: boonkhaiyeoh

Post on 07-Jul-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Digital Electronics Assignment Example

8/18/2019 Digital Electronics Assignment Example

http://slidepdf.com/reader/full/digital-electronics-assignment-example 1/11

ASSIGNMENT TITLE: DESIGN OF DIGITAL CALCULATOR 

SUBJECT: UEEA1323 DIGITAL ELECTRONICS

 

LECTURERS: Dr LEE KIM YEE / Mr YAP WUN SHE

DATE OF SUBMISSION:

GROUP MEMBERS:

 Name ID Course Lecture Group

1

Page 2: Digital Electronics Assignment Example

8/18/2019 Digital Electronics Assignment Example

http://slidepdf.com/reader/full/digital-electronics-assignment-example 2/11

INTRODUCTION AND OBJECTIVES

This assignment is aout ho! to "esign a asic "igita# ca#cu#ator that is a#e to "o the

operation o$ a""ition %&' an" sutraction %(' o$ t!o sing#e "ecima# numer %)(*' using a

Dee"s so$t!are+ Basica##,- the input numer !hich is presse" , the user !i## e con.erte" to

the inar, numer , using priorit, enco"er+ Ne/t- the inar, numer !i## e store" in the

register an" then per$orm the a""ition or sutraction operation ase" on the user !ish+

0ina##,- the resu#t !hich is compute" !i## e "isp#a,e" out on the se.en(segment "isp#a,s+ 1s

such- the main o2ecti.e o$ this assignment is to #earn ho! to use the so$t!are to "esign a

#ogic circuit !hich is a#e to per$orm a""ition an" sutraction operation+ The others

o2ecti.es are to use priorit, enco"er to enco"e "ecima# input to inar, output- to un"erstan"

the properties o$ register as a set o$ $#ip($#ops use" to store the inar, "ata or in$ormation-

a#e to use "ecima# a""er to per$orm a""ition operation an" to per$orm sutraction operation

 , using 3OR gate $unction an" #earn ho! to use the se.en(segment "isp#a,s+

BRIEF OF THE DESIGNED CALCULATOR 

0igure 4 sho!s the initia# part o$ the "esign that is the input push(utton- each utton

represents a numer or an operation to interact !ith the user+

0igure 4

Those numer uttons e/cept 5)6 are connecte" to a priorit, enco"er as sho!n in

0igure 7+ The enco"er is use" to con.ert the "ecima# numer to inar, numer+ 8hen

2

Page 3: Digital Electronics Assignment Example

8/18/2019 Digital Electronics Assignment Example

http://slidepdf.com/reader/full/digital-electronics-assignment-example 3/11

"i$$erent utton is pushe"- "i$$erent inar, output is pro"uce" at the output o$ the priorit,

enco"er+ 0or e/amp#e- !hen numer 596 utton is presse"- 54)))6 is pro"uce" as the output+

It is then in.erte" to 5)4446 , using NOT gates+

0igure 7

The output o$ the priorit, enco"er is connecte" to the para##e#(in(para##e#(out register 

as sho!n in 0igure ;+ The inar, !i## e store" in the register to carr, out $urther 

computation+ 8hene.er the numer utton is pushe"- it !i## act as a c#oc< input $or each

register+ The $irst an" thir" registers in.o#.e in the computation o$ t!o inar, numers+

=o!e.er- secon" register is use" to store the $irst input numer !hen the secon" input

numer is presse"+ Ne/t- it !i## e trans$erre" to the thir" register !hen 5E>U1L %?'6 utton

is presse"+ The E input means ena#e @ "isa#e- thus it is connecte" to 4 a## the time in or"er to

turn it on+

3

Page 4: Digital Electronics Assignment Example

8/18/2019 Digital Electronics Assignment Example

http://slidepdf.com/reader/full/digital-electronics-assignment-example 4/11

0igure ;

8hen the 51DD %&'6 or 5MINUS %('6 utton is pushe"- the "ata A) %1DD' an" A4

%MINUS' !i## e sent to a D($#ip $#op to store the memor, !hich is sho!n in 0igure an" +

0igure 0igure

Each output $rom $irst register is passe" through a 3OR gate to the a""er- !hi#e the

outputs o$ the thir" register are "irect#, connecte" to the a""er as sho!n in 0igure + The

$unction o$ the 3OR gates is to in.ert the inar, inputs %to per$orm 4s comp#ement' $or 

sutraction operation+ 0or e/amp#e- 4))4 !i## e in.erte" to )44)+ On the other han"- the

 inar, inputs $or a""ition operation remain unchange"+

4

Page 5: Digital Electronics Assignment Example

8/18/2019 Digital Electronics Assignment Example

http://slidepdf.com/reader/full/digital-electronics-assignment-example 5/11

0igure

1$ter passing through the $irst a""er circuit- the "ata store" !i## e a""e" or 

sutracte"+ The $o##o!ing #ogic circuit in 0igure 9 is use" to "etect the o.er$#o! o$ inar,

output an" correct the output numers+ Let sa,- i$ the inar, output a$ter a""ition operation is

4444 %4'- the he/ "isp#a, !i## sho! 506 instea" o$ 546 !hen the output is "irect#,

connecte" to it+ There$ore- those numers that are more than * are "etecte" an" correcte" ,

a""ing )44) %' to it !ith the suseuent a""er+ This is "one , comparing the $irst it inar,

numer- secon" an" thir" $rom most signi$icant it %$rom #e$t to right'+ I$ t!o o$ them are

eua# to A4- then a"" )44) %' to the inar, numer+

1""itiona# #ogic circuit %a NOT gate an" an 1ND gate' !as  a""e" to "etect negati.e

output numers !hich is circ#e" in 0igure 9+ 8hen negati.e output numer is "etecte"- one

o$ the pins o$ $our 3OR gates !as input !ith A4 to in.ert the inar, numer %to per$orm 4s

comp#ement'+ The 3OR gate connecte" to carr, input o$ the secon" a""er is to "etermine

!hether a""ing A4 or A)+ It !i## a"" A4 to the inar, numer $or sutraction ecause this

ca#cu#ator is "esigne" in 7s comp#ement+ Negati.e output numers "etection is "one ,

comparing the carr, output $rom most signi$icant it+ The carr, output !i## e A4 on#, !hen

the output is negati.e numer+ 0or e/amp#e- 5;6 F 56 is eua# to 5))446 F 5)4)46 in inar,

5

Page 6: Digital Electronics Assignment Example

8/18/2019 Digital Electronics Assignment Example

http://slidepdf.com/reader/full/digital-electronics-assignment-example 6/11

numer+ 5(6 is representing 54)446 in 7s comp#ement+ The sum o$ these t!o numers is

54))4)6 an" 546 acts as a carr, output in this case+ On the other han"- A) !i## e a""e" to the

 inar, numer !hen a""ition operation is acti.ate"+ In short- the $unction o$ secon" a""er are

to a"" to those output numers more than * $or a""ition operation an" a"" 4 to those

negati.e output numers $or sutraction operation+

0igure 9

1 D $#ip($#op as sho!n in 0igure is use" to contro# the negati.e sign sho! $or the

negati.e output numers+ The i"ea ca#cu#ator is that !hen 5E>U1L %?'6 utton is presse"- it

!i## sho! the correct output since 5E>U1L %?'6 utton acts as c#oc< input+ =o!e.er- the

$#ip($#op "oes not turn on the negati.e sign LED at the right time "ue to the c#oc< input+

8hen 5E>U1L %?'6 utton is presse"- it !i## on#, "o the computation+ Thus- the negati.e

sign on#, stores insi"e the register instea" o$ sen"ing it+ This pro#em is so#.e" , using an

1ND gate+ 8hen 5MINUS %('6 utton is presse"- A4 !i## store insi"e the register+

0urthermore- !hen the output numer is negati.e that is "etecte" , a NOT gate an" an 1ND

6

Page 7: Digital Electronics Assignment Example

8/18/2019 Digital Electronics Assignment Example

http://slidepdf.com/reader/full/digital-electronics-assignment-example 7/11

gate !hich is circ#e" in 0igure 9- A4 !i## e sent to one o$ the input pins o$ the 1ND gate+

Since oth inputs o$ the 1ND gate are A4- thus the negati.e sign LED !i## e #ighte" up+

0igure

The 5&6 sign LEDs or 5(6 sign LEDs !i## e #ighte" up !hen 51DD %&'6 or 5MINUS

%('6 utton is pushe"+ I$ 5CLE1R@ON6 is presse"- the LEDs !i## e "eacti.ate"+ Thus- the

c#oc< input $or this register is the uttons o$ 51DD %&'6 an" 5MINUS %('6 !hich is sho!n in

0igure *+ =o!e.er- the 5(6 sign LEDs !i## e #ighte" up in oth a""ition an" sutraction

operation+ =ence- an 1ND gate is connecte" to the output o$ D $#ip($#op !here the output $or 

51DD %&'6 is A) an" 5MINUS %('6 is A4+ B, using a NOT gate an" 3OR gate- the output

!ou#" e 4 "espite o$ the input is A) or A4+ Thus- the 5(6 sign LEDs !i## e #ighte" up as

#ong as there is c#oc< input o$ the register+ 5H6 sign LEDs !i## on#, #ight up !hen user press

51DD %&'6 utton+ The ottom 1ND gate is use" to "etermine !hether to turn it on or o$$+

7

Page 8: Digital Electronics Assignment Example

8/18/2019 Digital Electronics Assignment Example

http://slidepdf.com/reader/full/digital-electronics-assignment-example 8/11

0igure *

Last ut not #east- the he/ "isp#a, !i## "isp#a, the ans!er compute" !hen 5E>U1L

%?'6 utton is presse"+ The 5?6sign LEDs !i## #ight up !hen 5E>U1L %?'6 utton is presse"+

This is "one , a D $#ip($#op- the 5E>U1L %?'6 utton acts as a c#oc< input an" there is

a#!a,s A4 connecte" to the preset an" the $#ip($#op input- D as sho!n in 0igure 4)+ =ence-

!hen 5E>U1L %?'6 utton is presse"- the output A4 pro"uce" $rom the $#ip($#op #ights up the

5?6 sign LEDs+

0igure 4)

8

Page 9: Digital Electronics Assignment Example

8/18/2019 Digital Electronics Assignment Example

http://slidepdf.com/reader/full/digital-electronics-assignment-example 9/11

USER MANUAL

The input numers %)- 4- 7- ;- - - - 9- - *' an" operation uttons %&- (' are on the

upper #e$t corner o$ the "esigne" #ogic circuit -an" the "isp#a, is on the upper right corner- as

sho!n in 0igure 44+

Steps to use the ca#cu#ator are in e#o!:

4+ To start the ca#cu#ator- press the 5CLE1R@ON6 utton+

7+ Press the $irst input numer+

;+ Then- se#ect the $unction !ante" %51DD%&'6 or 5MINUS%('6'+

+ Press the secon" input numer+

+ Press 5E>U1L%?'6 utton to "isp#a, the resu#t o$ the computation+

+ Press 5CLE1R@ON6 utton again to c#ear the memor, o$ the computation+

9+ Repeat the steps 7 to in or"er to use the ca#cu#ator repetiti.e#,+

0or e/amp#e- i$ the user press 5;6 utton- then press 51DD%&'6 utton- there are $our 

LEDs turn on to sho! the 5&6 sign+ Ne/t- press 56 utton an" 5E>U1L%?'6 utton- the

output "isp#a, !i## sho! the numer 56- !hich is sho!n in 0igure 47+ On the other han"- i$ 

the user press 5;6 utton- then press 5MINUS%('6 utton- there are t!o LEDs turn on to sho!

the 5(6 sign+ Ne/t- press 56 utton an" 5E>U1L%?'6 utton- the output "isp#a, !i## sho!

the numer 5(76- !hene.er the resu#t is negati.e numer- there is a LED turns on to sho! the

5(6 sign- !hich is sho!n in 0igure 4;+

Re!r"#: This ca#cu#ator "esigne" is on#, $or 1DDITION%&' an" SUBTR1CTION%('

operations o$ t!o sing#e "ecima# numer %)(*'+ In or"er to use the ca#cu#ator- the user must

 press the 5CLE1R@ON6 utton+ Moreo.er- the user must <e, in an operation %a""ition or 

sutraction' a$ter $irst input+ The user must c#ear the memor, each time a$ter each

computation+ In short- the user shou#" $o##o! the steps ao.e strict#,+

0igure 44

9

Page 10: Digital Electronics Assignment Example

8/18/2019 Digital Electronics Assignment Example

http://slidepdf.com/reader/full/digital-electronics-assignment-example 10/11

0igure 47

0igure 4;

CONCLUSION

In conc#usion- the "igita# ca#cu#ator is "esigne" , using Dee"s so$t!are+ The a""ition

an" sutraction operation o$ the #ogic circuit "esigne" is stu"ie" an" un"erstoo"+

0urthermore- the #ogic $unctions !hich are use" in the assignment are #earne"+ In a""ition-

the $unction o$ each #ogic gate !hich is use" in the assignment is un"erstoo" an" <no!n+

10

Page 11: Digital Electronics Assignment Example

8/18/2019 Digital Electronics Assignment Example

http://slidepdf.com/reader/full/digital-electronics-assignment-example 11/11

APPENDI$

11