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
Flauer [41]
3 years ago
8

Design an algorithm to convert a decimal number, n, to binary format?

Computers and Technology
1 answer:
Fudgin [204]3 years ago
8 0

An algorithm that would convert a decimal number n to binary format must have at least 16 commands.

<h3>What is an algorithm?</h3>

An algorithm is a term to refer to a series of sequential instructions that allow actions or programs to be executed. It is an indispensable tool for the digital world because it is the basis for technology.

An example of an algorithm to convert from decimal numbers to binary format would be:

Process Decimal_bin

Define decimal as Integer;

Define binary as Character;

Define modulus as Integer;

Define aux as Integer;

Write 'Enter the decimal number';

Read decimal;

aux<-decimal;

binary<-'';

While decimal>0 Do

 modulus<-decimal MOD 2;

 binary<-Concatenate(ConvertToTex(modulus),binary);

 decimal<-trunc(decimal/2);

FinWhile

Write binary;

EndProcess

Learn more about algorithm in: brainly.com/question/21970419

You might be interested in
The LList class is (mostly) the same one discussed in lecture, but you must write a sort() function that uses one of the three i
Vladimir79 [104]

Answer:

see explaination

Explanation:

#include <iostream>

#include <string>

using namespace std;

class LinkedList{

class Node{

public :

int data;

Node* next;

Node(int data){

this->data = data;

next = NULL;

}

};

public :

Node *head;

LinkedList(){

this->head = NULL;

}

void insert(int d){

Node* new_node = new Node(d);

new_node->next = head;

head = new_node;

}

// sort the list with selection sort algorithm.

// Pick the smallest element in the unsorted array and place in the first element in the unsorted.

void sort_list(){

if (head == NULL){

return;

}

Node* current = head;

while (current->next != NULL){

Node* min_node = current;

Node* traverse = current->next;

while(traverse != NULL){

if(traverse->data < min_node->data){

min_node = traverse;

}

traverse = traverse->next;

}

int temp = current->data;

current->data = min_node->data;

min_node->data = temp;

current = current->next;

}

}

void print_list(){

Node* current = head;

while(current !=NULL){

cout<<current->data<<" ";

current = current->next;

}

cout<<"\n";

}

};

int main(){

LinkedList ll;

for(int i=0;i<10;i++){

ll.insert(i);

}

ll.print_list();

cout<<"*******************************************\n";

ll.sort_list();

ll.print_list();

cout<<"*******************************************\n";

}

8 0
3 years ago
Peter works on a huge database of numerical figures in a worksheet ranging from cell A1 to cell I50. He has to print the workshe
bekas [8.4K]

Answer:

Landscape or vertical page orientation

Explanation:

In landscape  he can mange the number of cell that are required to print on A4 page size.

On landscape orientation of the page we can add more columns of the sheet. That is the reason, we should choose landscape or horizontal page orientation to adjust all columns on the single page.

8 0
3 years ago
Read 2 more answers
Which model states that the people and the environment for communication are constantly changing? A. linear B. interactive C. tr
In-s [12.5K]

The interactive model of communication states that the people and the environment for communication are constantly changing.

B. interactive

<u>Explanation:</u>

The world is a big place and you must have come across the infamous hearing, "Change is the only constant". Gradually, with the passage of time, the mindset of the people change over a certain topic for communication.

For instance, in old times, people did not prefer their children to have love marriages, in fact India has also seen honor killings to prevent love marriages. But now most portion of the society stands in favor of love marriages. People change, perspective change, and so does the perception and ideas.

6 0
3 years ago
If a line is 4’ and you scaled it using 1/8” =1’ what would the size of the line be?
Gnesinka [82]
One half inch to scale
8 0
3 years ago
What does a "swivel chair" work task involve?
nadezda [96]

Answer:

An employee literally swings from application to application to accomplish the laborious task of manually copying information from one application, validating it, and pasting it in another application. In applying human judgment and decision making: Entering data multiple times into different applications. Ensure that complex information obtained from an application is accurate. Communicate physicallly with a group of people simultaneously.

Explanation:

4 0
2 years ago
Other questions:
  • Special programs that facilitate communication between a device and the os are called
    12·1 answer
  • Molly, a technician, has been tasked with researching an emulator for the software developers to test cross-platform application
    7·1 answer
  • 50 Points! 25 Points Each! Please help ASAP! Will mark brainliest! See attached image.
    10·2 answers
  • Write a program that will find the smallest, largest, and average values in a collection of N numbers. Get the value of N before
    13·1 answer
  • I stole you pokemon cards :o
    6·2 answers
  • Is backing up computer files done on the hard drive?
    14·2 answers
  • Victoria has a .... of playing with her hair when she gets nervous​
    9·1 answer
  • Design a loop that asks the user to enter a number. The loop should iterate 10
    15·1 answer
  • Which are the top 10 Popular Cars and Video Games get max ammount of point that we can give​
    12·2 answers
  • If a computer uses 500 characters, how many bits this system requires to give different code to all characters?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!