Skip to content

jakeee51/Twos-Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Two's-Complement-Calculator

Inputs:

  • Number of bits (w)
  • 2 two's complement binary numbers (display decimal representation)
  • Arithmetic Operation (+, -, x, /)

Outputs:

  • Calculated Result (display decimal representation)
  • Truncated Result (display decimal representation)

Example:

Here we do a 4 bit addition of 2 + 1

$ ./run.sh 4 + 0010 0001

Output:

The resulting sum gives the calculated number, calculated decimal, truncated number, truncated decimal representations respectively.

$ 00011,3,0011,3

About

A Two's Complement Calculator

Resources

Stars

Watchers

Forks