North South University: Department of Electrical & Computer Engineering

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Department of Electrical & Computer Engineering

North South University

Course Code: CSE332 Lab


Course Name: CSE-332 Computer organization and architecture

Student Name & ID: Mehadi Hasan - 1731160042(Sec-5)


Experiment Name: Design of a 4-bit Binary Up-Down counter.

Instructor: Md. Saidur Rahman

Date of Submission: 07 December, 2020


Experiment Name: Design of a 4-bit Binary Up-Down counter

Objective:

 Learn to design and build a 4-bit binary up-down counter. This counter follows the
binary number sequence. 4-bit binary counter is a register of 4 flip-flops and associated
gates that follows a sequence of states according to the binary count of 4 bits, from 0 to
15.
 Learn two types of changes. Up and Down changes. Up change add one bit and down
change subtract.
 Learn to use T flip-flops, which are built using D flip-flops. The T flip-flops act as a toggle
switch. When the input is 0, there is no change in the output of the T flip-flops. It retains
the previous value. But when the input is 1, the output is complemented. A XOR gate
combined with a D flip-flop can be used to create a T flip-flop.
 Learn to design a 4 bit binary up down counter which is synchronous, so all of the flip-
flops have a common clock pulse. For counting up, the next flip-flop changes state when
there is a transition from 0 to 1. Then use the Q output and connect it to the next flip-
flop. For counting down, the next flip-flop will change state when there is a transition
from 1 to 0. Then use the Q’ output and connect it to the next flip-flop.
Circuit Diagram:
Logic table:

Clock A B C D

pulse

P0 0 0 0 0

P1 0 0 0 1

P2 0 0 1 0

P3 0 0 1 1

P4 0 1 0 0

P5 0 1 0 1

P6 0 1 1 0

P7 0 1 1 1

P8 1 0 0 0

P9 1 0 0 1

P10 1 0 1 0

P11 1 0 1 1

P12 1 1 0 0

P13 1 1 0 1

P14 1 1 1 0

P15 1 1 1 1
Discussion: We learn to construct a 4-bit universal shift register. Hope we will get expected output and
result as shown on the data table. As it was online class we didn’t face any problem. We can perfectly
install the instrument to get perfect output. We have learned about many new instruments and
processes from the experiment.

Question/Answer:

1. When Up and Down both switches are on, which value will be counted?

Answer: The values of up switches will be counted and the value for down switches will be ignored.

2. Why the value comes to 0 after 15 if the up switch is on and 15 comes after 0 if the down switch
is on?

Answer: Because the counter adds one bit when the up switch is on and subtracts one bit when the
down switch is on with the current value.

You might also like