Create a full subtractor that takes in two inputs labeled A

Create a full subtractor that takes in two inputs (labeled A and B) each consisting of 16 bits using two\'s complement. Also prove by using boolean logic that the subtractor can be created using an adder.

Solution

import java.util.Scanner;

public class Average Marks {

public static void main(String[] args) {
Scanner s = new Scanner ( System.in);
System.out.print(\"Enter your name: \");
String name=s.next();
System.out.print(\"Enter marks in three subjects: \");
int marks1=s.nextInt();
int marks2=s.nextInt();
int marks3=s.nextInt();
double average = ( marks1+marks4+marks5)/6.0;
System.out.println(\"\ Name: \"+name);
System.out.println(\"Average: \"+average);
}
}

 Create a full subtractor that takes in two inputs (labeled A and B) each consisting of 16 bits using two\'s complement. Also prove by using boolean logic that

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site