1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
OleMash [197]
3 years ago
15

What is the difference between signed and unsigned numbers in binary? Explain 2's complement numbers using a simple example.

Computers and Technology
1 answer:
photoshop1234 [79]3 years ago
7 0

Answer:

Signed numbers represent sign like positive or negative for a number. Unsigned numbers don't store any bit for sign

Explanation:

Signed numbers are the binary numbers where leftmost digit is used to store the sign and the remaining bits used to store the value (magnitude). if leftmost bit of binary number is 0 it is positive number and if it is 1 then it is a negative number

ex: 00110101 represents (+53)

Here 0 (leftmost) represents sign.

Unsigned number is the number which don't have any sign bit. Here only positive numbers we will represent.

ex:0110101(53)

2's complement:  This is used to represent signed numbers. we will get 2's complement by inverting the bits of number and adding 1 to it

0111 1110 for 2's complement first invert the number

1000 0001  after inversion add 1 to it then we will get

010000010

You might be interested in
The purpose of this assignment is to determine a set of test cases knowing only the function’s specifications, reported hereaf
Nesterboy [21]

Answer:

The program is written using PYTHON SCRIPT below;

N=int(input(" Enter number of Rows you want:"))

M=[] # this for storing the matrix

for i in range(N):

l=list(map(int,input("Enter the "+str(i+1)+" Row :").split()))

M.append(l)

print("The 2D Matrix is:\n")

for i in range(N):

print(end="\t")

print(M[i])

W=[] # to store the first non zero elemnt index

T=[] # to store that value is positive or negative

L=len(M[0])

for i in range(N):

for j in range(L):

if (M[i][j]==0):

continue

else:

W.append(j) # If the value is non zero append that postion to position list(W)

if(M[i][j]>0): #For checking it is positive or negative

T.append(+1)

else:

T.append(-1)

break

print()

print("The first Non Zero element List [W] : ",end="")

print(W)

print("Positive or Negative List [T] : ",end="")

print(T)

Explanation:

In order for the program to determine a set of test cases it takes in input of 2D matrix in an N numbet of rows.

It goes ahead to program and find the column index of the first non-zero value for each row in the matrix A, and also determines if that non-zero value is positive or negative. The If - Else conditions are met accordingly in running the program.

5 0
3 years ago
Write an application that displays appropriate prompts to the user and reads a person
vfiekz [6]

Answer:

The program to this question can be given as:

Program:

import java.util.*; //import package  

public class Person_detail //define class

{

public static void main(String ar[]) //define main function

{

String Name,hobby,dream_Job; //declare variable.

int age;

Scanner sc = new Scanner(System.in); //creating Scanner class object for user input.

System.out.print("Enter Your Name : "); //message  

name = sc.next(); //user input

System.out.print("Enter Your Age : ");

age = sc.nextInt();

System.out.print("Enter Your hobby: ");

hobby = sc.next();

System.out.print("Enter Your aim: ");

aim = sc.next();

//print values.

System.out.println("Hello, my name is "+name+" and I am "+age);

System.out.println("years old.My hobby is playing "+hobby+".");

System.out.println("I want to be a "+aim+" when I grow up!");

}

}

Output:

Hello, my name is XXX and I am 21

years old.My hobby is playing cricket .

I want to be a cricketer when I grow up!.

Explanation:

In the above program firstly we import the package for user input. Then we declare a class that is Person_detail. In this class, we declare the main function. In the main function, we declare a variable that is name, hobby, aim, and age. In these variable first 3 variables datatype is string and age variable data type in integer. Then we create a scanner class object and take input from the user and print it into a paragraph.

3 0
3 years ago
Compter History Large Resume Include: the beginnings of the computer and its development during the years The events of computer
NikAS [45]

Answer:

The development of computers from the beginning to what we see now is called the computer generations. It is gradual advancement in the technology in the making of the computer.

Explanation:

The generation in computer technology can be defined as the development or the change in the technology in the computer as it was used. There were  five generations of computer development. They were :

1. First Generation computers

   In this generation, vacuum tubes was used in the circuits. It dated from 1946 to 1959.

2. Second Generation computers

  These are transistors based computers. This generation ranges from 1959 to 1965.

3. Third Generation computers  

    This generation computers were Integrated circuit based. The generation stared in 1965 and ended in 1971.

4. Fourth Generation computers

   The computers of this generation used VLSI microprocessor in the circuits. The period of the 4th generation computers are from 1971 to 1980.

5. Fifth Generation computers

   The computers of this generation used ULSI microprocessor in the circuits. The 5th generation computers started from 1980s.

4 0
3 years ago
IPv4 addresses are managed and controlled by Internet Service Providers (ISPs) which operate on a local basis. As such, Internet
klio [65]

Answer:

The following statement is True.

Explanation:

Because the Internet Service Provider is the company that grants users to access the internet and It also controlled and manage the IPv4 addresses which are operated on a regional or a local basis. The map of all the incoming and outgoing Internet Protocol addresses between the ISPs is done by the IXPs(Internet Exchange Points).

7 0
4 years ago
There are five identical closed boxes. one box contains $10,000, two boxes contain $1000 each, one box contains $1, and the last
sp2606 [1]
Mean means most and the most he can get is the 10000 and the 2 1000s and the 1 dollar so the mean is 12001.
6 0
4 years ago
Other questions:
  • 11. John wants to share resources and move a large volume of data quickly over the Internet. John should use which of the follow
    14·1 answer
  • When examining the digital evidence, what stage deals with using keyword searches and file-carving utilities to locate data that
    5·1 answer
  • why is there a need of properly interpreting teacher's/manufacturer's specifications before operating any food processing equipm
    9·1 answer
  • 2.36 LAB: Warm up: Variables, input, and casting (1) Prompt the user to input an integer, a double, a character, and a string, s
    12·1 answer
  • Your computer system is a participant in an asymmetric cryptography system. You've crafted a message to be sent to another user.
    13·1 answer
  • You are a Data Scientist at Anthem Blue Cross Blue Shield. You want to check if a patient will develop diabetes. Please write th
    5·1 answer
  • In this lesson you wrote code to make the turtle draw squares. Briefly describe how the code for
    11·1 answer
  • Can someone please help me to point out what's wrong with this C program:
    13·1 answer
  • PLEASE HELP ASAP!! Timed test!!
    12·1 answer
  • Can able to Computer decide its input by itself? How ?​
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!