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
bulgar [2K]
2 years ago
5

What is the function of ALU? ​

Computers and Technology
1 answer:
Murljashka [212]2 years ago
3 0

Answer:

<u>The ALU performs simple addition, subtraction, multiplication, division, and logic operations, such as OR and AND. The memory stores the program's instructions and data.</u>

You might be interested in
Consider an interface p ublic interface NumberFormatter { String format (in n); } Provide four classes that implement this inter
sesenic [268]

Answer and Explanation:

Here is the code for the question with output.

public interface NumberFormatter {

  public String format(int n);

}

class DefaultFormatter implements NumberFormatter

{

  public String format(int n)

  {

      return String.valueOf(n);

  }

}

class DecimalFormatter implements NumberFormatter

{

  public String format(int n)

  {

      return String.format("%,d",n); //formats the number by putting comma for 3 digits

  }

}

class AccountingFormatter implements NumberFormatter

{

  public String format(int n)

  {

      return String.format("(%d)",n);

  }

}

class BaseFormatter implements NumberFormatter

{

  int base;

 

  public BaseFormatter(int b)

  {

         

      base = b;

      if(base < 2 || base > 36) //if values out of range 2-36 inclusive are given, set default to 2

          base = 2;

  }

  public String format(int n)

  {

      return Integer.toString(n, base);      

  }

  int getBase()

  {

      return base;

  }

}

public class TestNumberFormatter {

  private static void print(int n, NumberFormatter formatter)

  {

      String s = String.format("%15s",formatter.format(n));

      System.out.print(s);

  }

  public static void main(String[] args) {

      int numbers[]= {100,55555,1000000,35,5};

      DefaultFormatter defFmt = new DefaultFormatter();

      DecimalFormatter deciFmt = new DecimalFormatter();

      AccountingFormatter accFmt = new AccountingFormatter();

      BaseFormatter baseFmt=new BaseFormatter(16) ; //base 16

      String s;

     

      System.out.println("\tDefault \t Decimal \tAccounting \t Base("+baseFmt.getBase()+")");

      for(int i = 0; i < numbers.length; i++)

      {

          print(numbers[i], defFmt);

          print(numbers[i], deciFmt);

          print(numbers[i], accFmt);

          print(numbers[i], baseFmt);

          System.out.println();//new line

      }

     

  }

}

output

  Default    Decimal    Accounting    Base(16)

100 100 (100) 64

55555 55,555 (55555) d903

1000000 1,000,000 (1000000) f4240

  35 35 (35) 23

5 5 (5) 5

3 0
3 years ago
What is the keyboard shortcut for the Undo command?
Vanyuwa [196]

Answer:

CTRL+Z is Undo

Explanation:

CTRL+X: Cut

CTRL+Z: Undo

CTRL+U: Underline

CTRL+V: Paste

4 0
4 years ago
which option will joan use to get a glimpse of how her presentation will look like when she presents it to her audience
harina [27]
She should use slideshow
4 0
4 years ago
Read 2 more answers
If a football player had to use the restroom during a play what do they do?
Artyom0805 [142]
Usually they wait for halftime
4 0
3 years ago
Karen works in a department store. Her coworker gave diverse cultural backgrounds. Which statement shows that Karen understand t
Goshia [24]

Answer:

Karen!

Explanation:

hahhahahahhahaahhahahaahahha

she wouldn't understand anything

anyways, where is the statements THEN I'll edit my answer シ

5 0
3 years ago
Other questions:
  • Suppose that some company has just sent your company a huge list of customers. You respond to that company with a strongly worde
    15·1 answer
  • Getting access to web browsing software to install it on a computer or to update your existing software is called _________ .
    9·2 answers
  • In order to install a device, the operating system needs the required __________ for that device.
    15·2 answers
  • What is a file that has an .iso extension? What does this extension indicate?
    8·1 answer
  • The conscious process of planning and controlling how you spend your time is called?
    15·1 answer
  • What is the process of designing green buildings called
    9·2 answers
  • It is a small hand tool used generally in decorative works such as making garnishes
    15·1 answer
  • Write a Java Program that can compute the mean, median, the highest, and the lowest of the students’ scores in a class. First, t
    6·1 answer
  • Why was CDR the most developed country in nepal. Highlight any six reasons​
    9·1 answer
  • When using a self-contained recovery device on a cfc, hcfc, or hfc system with an operating compressor, technicians must?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!