DESCRIBE IN DETAILS HOW THIS LOGICAL CALCULATOR WITH BINARY HEXADECIMAL WORKS WI
ID: 3575705 • Letter: D
Question
DESCRIBE IN DETAILS HOW THIS LOGICAL CALCULATOR WITH BINARY HEXADECIMAL WORKS WITH EXAMPLES
Created from multi media logic
Subject: Computer hardware
Calculator with Binary and Hexadecimal Outputs
The first project, illustrated in fig 1, is a calculator that
takes two four-bit inputs, from hexadecimal keypads, and
provides an output in both binary and hexadecimal, based
on a function selected. The function is selected with the
selector switch. The functions available in the ALU are:
addition, subtraction, multiplication, division, equal, less
than, shift right and shift left.This is a nice project to start with as it builds on the ALU
device example that is provided with Multimedia Logic.
The learning outcomes of this project are: familiarity with
the ALU, comparing hexadecimal and binary, exploring
properties of binary numbers under operations like the 5-6
operation shown in figure 1 to see the two’s complement
binary notation of a negative one.
Explanation / Answer
Answer :
Here in this Binary Hexa decimal calulator, you can several operations like addition,substraction,division,multiplication.
We will go through some example to make it understand better.
First of all, it gets input from two hexadecimal keyboard, another thing is function which is to be set for operation.
Output consists of Hexadecimal display, 8-bit binary output(0-7) and with zero and over flow flag and also carry out light.
Example 1: Subtraction
Here we input two numbers 5 and 6, function is set to A-B so we should do 5-6.
Carry In set to 0 as there is no carry.
5-6 = -1
Output result is FF and carry would be there. So in output FF display is set and all the binary LEDs are ON as binary of F F is 1111 1111(two's complement of -1). and carry out is ON.
Example 2 : Addition
Now we have 6 and A as input. Function is set to A+B.
No carry so carry in is 0.
6 + A = 10 (Hexadecimal addition of numbers)
So result : 1 0
carry flag set to 0.
In binary LED's only first LED will be on as binary of 1 0 is 1000 0000.
Example 3 : equal
Here we take input 3 and 3 from both hexadecimal keyboard.
Function set to A=B to check both input are same or not.
If it is same than it will output 1 otherwise 0.
So in our case output will be 1.
result : 01
Binary LED : last LED will be on as 0 1 binary 0000 0001.
if input is 3 and 2 than result would be 00.
Zero flag will be set.
Binary LED will not be on.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.