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
faust18 [17]
3 years ago
12

If each integer occupies one 64-bit memory cell and is stored using sign/magnitude notation, what are the largest (in terms of a

bsolute value) positive and negative integers that can be stored?
Computers and Technology
1 answer:
WITCHER [35]3 years ago
3 0

Answer:

2^63 = 9 223 372 036 854 775 808

Explanation:

Of 64 bits, one is used to store the sign. The rest of 63 bits is used to store the absolute value. The maximum value of n-digit number of base b is b^n.

We are using bits which represent binary (base 2) digits. Base b = 2, digits/bits n = 63. The maximum number is 2^63.

You might be interested in
Write a method so that the main() code below can be replaced by the simpler code that calls method mphAndMinutesToMiles(). Origi
defon

ANSWER

The JAVA program after simplification is as below.

import java.util.Scanner;

public class CalcMiles {

   

   // variables declaration

   static double milesPerHour;

   static double minutesTraveled;      

   static double hoursTraveled;

   static double milesTraveled;

   

   // method declared static

   public static void mphAndMinutesToMiles(double speed, double mins)

   {

       // computations to calculate distance travelled

       hoursTraveled = mins / 60.0;

       milesTraveled = hoursTraveled * speed;

       

       // result displayed on the screen  

     System.out.println("Miles: " + milesTraveled);

   }

   

   // Scanner object created inside main()

   // user input taken inside main()

   public static void main(String [] args)

   {

       Scanner scnr = new Scanner(System.in);

       System.out.println("Enter miles travelled per hour ");

       milesPerHour = scnr.nextDouble();

       System.out.println("Enter minutes required to travel ");

       minutesTraveled = scnr.nextDouble();

       

       mphAndMinutesToMiles(milesPerHour, minutesTraveled);

       

   }

}

OUTPUT

Enter miles travelled per hour  

2.3

Enter minutes required to travel  

1234

Miles: 47.30333333333333

EXPLANATION

The program is simplified as explained below.

1. User input is taken using the object of Scanner class.

2. This object of Scanner class can only be created inside main() method hence, user input can only be taken inside main().

3. The code to calculate the result is separated in another method, mphAndMinutesToMiles(). This method is declared with return type void since no value is returned.

4. After user input is taken in main() for miles travelled per hour and minutes required to travel, these values are passed as parameters to the mphAndMinutesToMiles() method.

5. These parameters are used in calculation part. The total miles travelled in total hours (obtained from minutes), is calculated. The code to display the result is added to this method.

6. Inside the main method, only the code to create Scanner object, code to take user input for two variables and code to call the mphAndMinutesToMiles() is included.

7. The variables are declared as static and declared at class level.

8. No variable is declared inside any of the two methods.

5 0
3 years ago
Read 2 more answers
What happens when you create a variable in a video game program?​
gulaghasi [49]

Answer:

A lot can happen, depending on the use of the variable

Explanation:

Lets create a position variable, a common variable in games.

Vector3 position = new Vector3(0, 0, 0);

The above variable initialization creates a new Vector3 object. The Vector3 class contains 3 properties, X, Y, and Z. When you assign the variable 'position' the new Vector3 object, the variable 'position' contains an instance of Vector3 where

X = 0,

Y = 0,

and Z = 0.

The variable 'position' can be used to set the position of a player, or an object.

We can reuse this variable when you want the object or player to move.

position.X = 29

position.Y = -14

position.Z = 47

now the object/player's position is (29, -14, 47).

Variables can be used for basically everything you need in programming, from storing a position, to storing the result of a complex math equation.

7 0
2 years ago
What term is used to identify the visual interface that displays information it receives from the computer?
olga nikolaevna [1]
The answer to this question is A
7 0
3 years ago
Default tab stops are set in word every ___________ inch.
iren [92.7K]
They are set every 1 inch.
6 0
3 years ago
3. Describe what a pre-processor does in a network-based IDS tool such as Snort. Demonstrate your understanding of this function
MrRissso [65]

Answer:

Pre-processors look at organize traffic and screens parcel transmissions by examining andreassembling divided data.Frag2:preprocessor that battles against IP fracture attacks.Attackers sends a fragmentedTCP bundle with header data that gets entrance through a firewall.At the equivalent time,other parcels with vindictive information "slip" by the firewall undetected because of the fragmentationbeing so little by overwriting the header information.The frag2 pre-processor is specificallydesigned to break down bundle discontinuity to search out noxious information in the sections, which iswhy this pre-processor ought to never be turned off.Stream4:preprocessor Snort uses to coordinate assault marks over numerous packets.Anattacker endeavors to send different parcels into the system conveying parts of the attackpayload which are required to be reassembled by the host so as to start an attack.Stream4 stores the bits of the mark until all bundles are transmitted.Once they are alltransmitted, Stream4 finishes the signature and an alarm is created.

Explanation:

8 0
3 years ago
Other questions:
  • AMSCO networks plans to conduct a poll of viewers during the SuperBowl. They will conduct analysis to determine which area of th
    6·2 answers
  • In the spreadsheet example shown in chapter 5 ____ run from top bottom and are designated by a letter?
    12·2 answers
  • Mention 3 wast water draining system on home​
    7·1 answer
  • Your health insurance company gives you a discount if you wear a fitness-tracking bracelet. After wearing it for a few months, y
    5·1 answer
  • A local reaction will occur at the site of the exposure, such as irritations or damage to the skin, eyes or lungs true or flase
    14·1 answer
  • You rub two red balloons against a wool scarf. What do you think will happen if you place the balloons near each other. Justify
    5·1 answer
  • Sally thought of adding a new paragraph after the
    6·1 answer
  • How can you assess a website for currency?
    14·2 answers
  • What is E-Commerce? Answer The Following. Pls Help Me​
    5·1 answer
  • security investigators discovered that after attackers exploited a database server, they identified the password for the sa acco
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!