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

Answers

Answer 1

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

What is an algorithm?

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: https://brainly.com/question/21970419


Related Questions

What is one of four key principles of Responsible Artificial Intelligence

Answers

FAIRNESS, transparency and explainability

Maze must establish a communication channel between two data centers. After conducting a study, she came up with the idea of establishing a wired connection between them since they have to communicate in unencrypted form. Considering the security requirements, Maze proposed using an alarmed carrier PDS over a hardened carrier PDS. Why would Maze make this suggestion in her proposal

Answers

Maze makes this suggestion in her proposal because the alarmed carrier PDS is because it offers continuous monitoring and less periodic visual inspections.

What is Protected distribution system?

This is a carrier system which is used in communication network environment for detection of the presence of a physical intruder.

The alarmed carrier PDS is preferably used as a result of it offering high level of security without periodic visual inspections.

Read more about Protected distribution system here https://brainly.com/question/10619436

what are the examples of computer software​

Answers

Answer:

Explanation:

Examples:

System softwareapplication softwareregistry cleanersoperating systems

8. SQL, Oracle Report, and Visual Basic are all examples under the
generation
A. First Generation
B. Second Generation
C. Third Generation
D. Fourth Generation

Answers

I am pretty sure the answer is the second gen

Sumit has created a procedure to draw a boat in Logo and saved it by the name, 'Boat'. Next day, when he tried to type the name 'Boat', the computer displayed the message "I don't know how to Boat". Why has it happened?​

Answers

The computer couldn't draw a boat because the "Boat command" has been deleted.

What is an algorithm?

An algorithm can be defined as a standard formula (procedures) which comprises a set of finite steps and instructions that is designed and developed to solve a problem on a computer under the appropriate conditions.

This ultimately implies that, an algorithm is a standard, logical formula (procedures) containing the step-by-step rules and instructions for performing a specific task on a computer system such as drawing a boat in Logo.

In this scenario, the algorithm created by Sumit on his computer couldn't draw a boat because the "Boat command" has been deleted from the computer system.

Read more on algorithm here: brainly.com/question/24793921

How to make an Array of GameObjects with the same tag on Unity?


C#

Answers

Answer:

i really dont know much about c#

i do python, html, and some other

Explanation:

thanks for the points tho

How do web-based applications and websites differ? (2 points)
Web-based applications allow users to do something while websites provide information.

Web-based applications run on a browser, while websites run on a network.

Websites require installation, whereas web-based applications do not.

Websites do not require internet access, while web-based applications do.
i am thanking, it is A​

Answers

Answer:

A website provides the visual and test content for users and a page in the web can only be read and content can be annulated and even may be outdated.

A web application is a software that is made to run on the web. It is within the reach of the users. It can be only viewed only in the web browser.

Hence the option A is correct.

Explanation:

Answer:

A. Web-based applications allow users to do something, while websites provide information.

Explanation:

Question 3 (1 point)
an assortment or set of type or characters all of one style and sometimes one size.
italic
O underline
font
Obold

Answers

an assortment or set of type or charactera all of one style and sometimes one size. Ans: italic

why it is important to know the computer hardware and software​

Answers

Answer:swer:

it makes no sense



Explanation:

Answer:

1) to earn a living

2) to added knowledge

3) to contribute positively to the technological aspect of the world.

Explanation:

1) one could earn a living as a teacher or a computer vendor or even a softwware engineer.

2) if one understand the computer, he could work system for families and friends

please help me please please

Answers

The light is shining on the left side of his face because the shadow is on the other side

pleaseee helpppppppppp

Answers

Answer:

EXAMPLE -

Create a variable and assign your age

var myage = 32;

type your age:

console.log(my age) ;

Notice that we did not type the actual numeric age. We used the variable instead. There wouldn’t be any purpose of declaring a variable if we were going to type 32 directly.

This makes the scrip more portable which means that the result on the screen is independent of the code console.log(myAge); . If we need to change our age all we have to do is to assign another number to the variable myAge and the output will change automatically. That’s the purpose of a variable.

Suppose a friend gives you a computer, but when you try to start it, a message appears asking for a BIOS password. You can't contact the friend to find out the password. How should you proceed?

Answers

Answer:

Clear the CMOS

Explanation:

The CMOS stores the BIOS settings.

Why might preparing taxes be different for people living in different states?
A. Everyone must file taxes but depending on where you live, you may not need to file federal taxes.

B. States taxes are due January 1st but federal taxes are due April 15th.

C. It’s not different. All states have the same tax laws.

D. Everyone must file federal taxes, but each state has different Tax laws.

Answers

The act of preparing taxes be different for people living in different states because Everyone must file state taxes but depending on where you live, you may not need to file federal taxes.

What is the reason for taxing the people?

Taxes are known to be a primary source of revenue that is made by the governments. This is known also to be the money that  is spent to develop and maintain public infrastructure.

It is said to be one that differs from place to place roads we travel on, and the act of preparing taxes is said to be different for people living in different states due to the fact that  all must file state taxes but based on where you live.

Learn more about taxes  from

https://brainly.com/question/25825000

df -h shows there is space available but you are still not able to write files to the folder. What could be the issue

Answers

The possible issue when df-h shows that there is space available is that;

It Ran out of inodes

What is a Linux System?

The correct reason is that it ran out of nodes in Ubuntu which is an open source operating system on Linux

Now,  In a "vanilla" installation, if you have too many small files, they can consume inodes, but not space. However, you will observe that you have available space, but since your inodes are full, you'll not be able to use this space.

Read more about Linux System at; https://brainly.com/question/25480553

ABC Manufacturing Company is located in Hiroshima, Japan. Being prone to earthquakes, the company decided to implement a backup of their data on a Singapore server. The IT administrator contacted you to identify the optimal command interface protocol for this backup. Which command interface protocol should you advise?

Answers

The command interface protocol that I would suggest to the IT administrator is Secure Shell (SSH).

What is a command interface protocol?

A command interface protocol can be defined as a standard protocol that is designed and developed to processes commands in the form of lines of text to a software program that is installed on a computer system.

The types of command interface protocol.

In Computer technology, there are different types of command interface protocol and these include:

SSLTLSSSH

SSH is an acronym for Secure Shell and it is a standard network protocol that gives a IT administrator a secure way to access data over an unsecured network, especially when backing up data.

Read more on SSH here: brainly.com/question/17147683

ILL GIVE BRAINLIEST
What are the pro and cons of digital news?

Answers

Answer:

pro is a

and cons are c

Explanation:

hope this helps you on digital news

Pros: Easier to spread urgent news, eco friendly, more variety
Cons: Easier to spread fake news

What's wrong with my program? Here is my code , if the user wants a 3rd card dealt they, have to select yes and the total will be for 3 cards. If they don't, then the total is for 2 cards.? I also need to print the total for both the dealer and the user and determine the winner of the game?


# import random
import random
def main():
# greet the user
print("Hello! Welcome to my card game!")
# deal the user a random card between 1 and 10
num1 = random.randint(1,10)
print("You drew a", num1)
# deal the user another random card (between 1 and two)
num2 = random.randint(1,10)
print("You drew a", num2)
num3 = random.randint(1,10)

# deal the user a third card?
again = input("Would you like to draw a 3rd card? Y or N? ")
d_total = random.randint(10,21)
u_total = (num1) + (num2) + (num3)
u_total1 = (num1) + (num2)
if again == "Y" or "y":

print("You drew a", num3)


if (u_total > d_total) and (u_total < 21):
# the user wins
print("Congratulations! You won!")
print("You drew a",num1,",", "a",num2,"," "and a",num3, "for a total of",u_total)
if again == "N" or "n":
print("You drew a", num1,"and a",num2, "for a total of",u_total1)


if (u_total > d_total) and (u_total < 21):


print("The dealer's total is", d_total)




else:

print("Sorry! You lose.")

main()

Answers

Your issue is on line 19 in your if statement. In python, if you have more than one condition in an if statement, you have to explicitly mention it after the or.

Your if statement is

if again == "Y" or "y":

However, this will always return true because the second statement simply asks "y".

To correct this, simply change the if statement to:

if again == "Y" or again == "y":

This will correct your code.

Another thing to consider is to always convert a userinput (whenever possible) to one version, this can be accomplished in your code by converting "again" into one version by using the .lower function.

again = input("Would you like to draw a 3rd card? Y or N? ")

again = again.lower()

Hope this helps!

Databases containing the research, writing and studies conducted by Academic
Professionals are called:

Answers

Scholarly databases allow the indexing of research, essays and  multidisciplinary studies for access by students, professors and researchers.

Advantages of using Scholarly Databases

It allows access to reliable and revised sources for researching academic content, generating greater speed and security of information available in a structured research system.

Therefore, the use of databases, such as Gale, allows the user greater reliability in research and the producer of work greater dissemination of content and protection of rights.

Find out more information about database here:

https://brainly.com/question/10646220

1. Is the replication of machine‘s intellect and a human intelligence..

2. One of the AI category that is capable of reacting upon human cognitive abilities and it is strong enough to discover a solution without the intervention of humans.

3. Its system is intended and qualified when it comes to an actual task.

4. A free subscription application that gives the background listening, no ads and downloads with a premium option on subscription that allows to listen to more than 200,000

5. A traditional way of knowing the information through newspaper, magazines, posters, banners and any form of printed materials. 1 point Your answer​

Answers

Answer:

when a burst tire while driving is advised

8. SQL, Oracle Report, and Visual Basic are all examples under the
generation
A. First Generation
B. Second Generation
C. Third Generation
D. Fourth Generation

Answers

SQL, Oracle Report, and Visual Basic are all examples under the generation.

Fourth generation languages

Fourth-generation programming language (4GL) are computer programming language based on the advancement on third-generation programming languages (3GL).

4GLs may include support for database management, report generation, mathematical optimization, GUI development, web development.

SQL, Oracle Report, and Visual Basic are all examples under the generation.

Find out more on Fourth generation languages at: https://brainly.com/question/9325849

How do I fix this do get an output counting down?

public class Main {
public static void main(String[] args) {
Main.countDownTo(5, 1);
}

public static void countDownTo(int from, int to) {

for( int counter = from; from <= to; from--) {
System.out.print(counter + ",");
}
}
}

Answers

Answer:Its C

Explanation: Because the explanation is very cool and smart

Imagine yourself in the middle of Manhattan, where the streets are perpendicular on avenues. You are in a grid of streets, somewhat lost, and you randomly pick one of four directions and walk to the next intersection. Not knowing where you really want to go, you again randomly pick one of the four directions, and so on. After repeating the same movement for a number of times, you may want to know how far you got from the original point.

Answers

To know the total distance that we have moved, we must add the partial distances that we have traveled from the initial point.

What is the distance?

Distance is a term that refers to the length between two points expressed numerically. According to this definition, if we want to know the distance between our point of origin and the final point, we must know the length of the streets that we have traveled.

According to the above, to know the total distance we have traveled, we could calculate approximately how long each of the streets we traveled and add them to obtain the total distance.

Learn more about distance in: https://brainly.com/question/989117

Write a BASIC program to calculate the area of a parallelogram with base 40cm and height 20cm.​

Answers

Answer:

base ×height

Explanation:

because parallelogram has opposite sides equal

what is the difference between arithmetic and relational operators​

Answers

Answer:

The arithmetic operator is used by the program to perform simple algebraic operations like addition, subtraction, multiplication, division, etc. Relational operators are the ones that are used to validate a relationship between the two operands as if they are equal, greater than, less than, etc.

Write a program using LinkedList class and ListIterator interface to demonstrate the following activities:
1. Create a singly linked list named "Alphabets" with four elements: "P", "Q", "R", and "T" in the same sequence. Create an iterator named "iter1" and attach it to the linked list.
2. Add a new element "O" at the beginning of the linked list.
3. Add a new element "U" at the end of the linked list.
4. Add a new element "S" after the element "R".
5. Remove the element "O" and "Q".
6. Display the linked list after performing each activity 1 to 5.

Sample output:
[P, Q, R, T]
[O, P, Q, R, T]
[O, P, Q, R, T, U]
[O, P, Q, R, S, T, U]
[P, R, S, T, U]

Answers

The program is an illustration of LinkedList.

What is a LinkedList?

A LinkedList is a data structure element that contains nodes where each node represents a value and also points to the next node.

The main program

The program written in Java, where comments are used to explain each line of the program is as follows:

import java.util.LinkedList;

import java.util.Iterator;

class Main {

 public static void main(String[] args) {

     //This creates the Alphabets LinkedList

   LinkedList<String> Alphabets = new LinkedList<String>();

   //This creates an iterator for the Alphabets LinkedList

   Iterator it = Alphabets.iterator();

   //This adds P, Q, R and T to the list

   Alphabets.add("P");    Alphabets.add("Q");    Alphabets.add("R");    Alphabets.add("T");

   //This prints the Alphabets LinkedList

   System.out.println(Alphabets);

   //This adds O to the beginning of the list

   Alphabets.addFirst("O");

   //This prints the Alphabets LinkedList

   System.out.println(Alphabets);

   //This adds U to the list

   Alphabets.add("U");

   //This prints the Alphabets LinkedList

   System.out.println(Alphabets);

   //This adds S after R

   Alphabets.add(4,"S");

   //This prints the Alphabets LinkedList

   System.out.println(Alphabets);

   //This removes O and Q from the list

   Alphabets.remove("O"); Alphabets.add("Q");

   //This prints the Alphabets LinkedList

   System.out.println(Alphabets);

 }

}

Read more about LinkedList at:

https://brainly.com/question/19754898

True or false: Information security primarily relies on technical approaches such as multifactor authentication or data encryption.

Answers

TRUE, that is a one-sided answer. One of the biggest examples is virtually unhackable blockchains.

It is true that information security primarily relies on technical approaches such as multifactor authentication or data encryption.

What is data encryption?

The three primary goals of information security are to prevent the loss of availability, integrity, and confidentiality for systems and data.

The majority of security practices and controls can be traced back to losses in one or more of these areas.

Data encryption is a method of protecting data confidentiality by converting it to encoded information known as ciphertext, which can only be decoded with a unique decryption key generated either during or before encryption.

Technical approaches to information security, such as multifactor authentication or data encryption, are primarily used.

Thus, the given statement is true.

For more details regarding data encryption, visit:

https://brainly.com/question/14635177

#SPJ5

What is the effectiveness of communication technology?

Answers

Explanation:

Majority of studies measured the effectiveness of ICT by measuring specific dimensions rather than social isolation in general. ICT use was consistently found to affect social support, social connection's, with social isolation in positively.

basics of visual basic

Answers

Visual Basic (VB) is an object-oriented programming language, and it supports the concepts of encapsulation, abstraction, polymorphism, etc. In VB, all the variables, methods, and application entry points are encapsulated within the class definition
Visual Basic (VB) is an object-oriented programming language, and it supports the concepts of encapsulation, abstraction, polymorphism, etc. In VB, all the variables, methods, and application entry points are encapsulated within the class definitions.

Which of these is not a step that you can take to avoid identity theft? O shred mail with private information O make a copy of your social security card to carry with you O use complicated passwords O keep your phone's security updated​

Answers

Making a copy of your social security card to carry with you isn't a step to avoid identity theft.

What is Identity theft?

This happens when someone uses another's personal data to commit fraud and other forms of crime.

It is usually best to keep one's personal information private through shredding mails which contain them and using strong passwords. Making a copy of your social security card can get misplaced and expose someone to identity theft.

Read more about Identity theft here https://brainly.com/question/17122077

why is the computer uses binary why not trinary?​

Answers

Explanation:

because they only function with that one the gates also prevent it from being able to use it

Other Questions
A group of friends wants to go to the amusement park. They have no more than $110 to spend on parking and admission. Parking is $16. 50, and tickets cost $11 per person, including tax. Write and solve an inequality which can be used to determine xx, the number of people who can go to the amusement park. in 1 word what is the tone of the white mans burden and why ? Date:......Exercise ..9.....Choose the correct form of the verb that agrees with the subject.1. That man (is, are) the one who painted our house last summer.2. Those children (was, were) arranged according to height.3. James (asks, ask) a lot of questions because he is anxious to learn.4. All our geese (swims, swim) in the pond adjacent to our property.5. Some boys (runs, run) much faster than others.6. Our vacation (lasts, last) for three weeks this year.7. Sam (want, wants) to know the results of the test.8. Each one (has, have) his own idea about how the outcome should be.9. Everything (was, were) laid out on the table in preparation for the meal.10. The cars (was, were) about to be washed by the school's club. which pair of lines is parallel?A, B, C or D FILL IN THE BLANKSSS!!4. The writing in Jackson's speech "On Indian Removal" is characterized by long and __________ sentences.5. Rutledge's writing in "Samuel's Memory" is characterized by ___________ sentences6. The __________ of Rutledge's essay is sadness and loss.PLEASEEE HELPPP!!!!!!! FILL IN THE BLANKSSSS!! What are the 5 characteristics of objectives After 60 seconds of ppv coordinated with chest compressions, the cardiac monitor indicates a heart rate of 70 beats per minute. What is your next action?. which statement is true of all the Abrahamic religions HELP ASAPWORTH 10 POINTSZS Can someone please help me? :( I need help if i get one more i fail if you get it right you get 70 points. For the same company and the same year, net income on a single-step income statement will be. Whats the answer?????? #10 In this unit, you calculated the surface area of solid figures composed of polygons, such as rectangles and triangles. But imagine finding the surface area of a cylindera solid figure that has several curved surfaces. A cylinder is made up of two circular bases and a curved (lateral) surface in between. Develop a formula for finding the surface area of the outside of a cylinder based on what you know about the circumference of a circle and the areas of circles and rectangles. (Hint: Think about rolling a rectangular piece of paper into the shape of a cylinder.) Discuss your approach and why it works. Javier has 24 math problems for homework this week. On Monday he solved 2/6 of the problems on Tuesday he solved 3/6 of the problems.on Thursday he finish solving the rest of the problems. How many problems did Javier solve on thursday Challenges that young people in South Africa face You have been hired at Maria's Kitchen, a restaurant in Riverside. Chef and owner Maria hasbeen asking her wait staff to take orders on paper. She would like a new system where thewait staff can type in orders. The system should also print tickets for the kitchen staff that areeasy to read so they know what dish to make and what table it belongs toFor those of you who have food service experience, you will recognize this as a very simplepoint-of-sale (POS) and kitchen display system (KDS). Learn more about POS and KDS here.Industry note: real systems tie into the restaurant's financial and accounting records forauditing (finance and accounting majors), automatically reorder supplies and ingredients atthe right time (supply chain majors), and allow access from a dashboard that can analyze thedata for patterns and trends as well as employee performance (management, marketing, andbusiness analytics majors). 1.1.11 Advise SM on the negative impact of the socio economic issues identified in QUESTION 1.1.10 (6 ) Help, please!!!!!!!Ahmed is developing a new smartphone model. It only includes apps, a processor, a memory card, and a microphone. What is it lacking? A. A program B. Input C. Output D. Memory Why did Israel agree to play a role in the Suez Crisis? To give control of the Suez Canal to Egypt To demonstrate its friendship with the United States To protect its own political and territorial needs in the region.