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
VashaNatasha [74]
2 years ago
11

What are the other number systems? and how to convert binary numbers to their decimal equivalent.?

Computers and Technology
1 answer:
Mrrafil [7]2 years ago
7 0
In computers we use: decimal constantly, hexadecimal daily, octal weekly and binary monthly.  Decimal is base 10, hexadecimal is base 16, octal is base 8 and binary is base 2.

To convert binary to decimal, simply add the magnitudes of the digits that are set.
You might be interested in
A personal phone directory contains room for first names and phone numbers for 30 people. Assign names and phone numbers for the
Fynjy0 [20]

Answer:

# include <iostream.h>

# include <stdio.h>

# include <string.h>

using namespace std;

class citizen

{      

    int i;

    public string name[30];

    public long int phonenumber[30];

    public void addindividual(string name1)

     {      

           If (i<=30)

            {     int flag=0;

                  for(int j=0; j<=i;j++)

                  {

                     if (strcmp(name[i], name1)

                      {

                          flag=1;

                      }

                     else

                     {  

                           flag=0;

                     }

                  }

                  If (flag)

                 {

                  if (i<30)

                  {

                  for(j=i+1;j<=30; j++)

                  {

                        cout<<"Enter the name:"; getchar(name[j]);

                        cout<<"Enter the phone number:"; cin>>phonenumber[j];

                         i++;

                   }

                  else  

                   {

                        cout<<"The person already exists";

                        exit();

                   }

              }

            else

             {

                 cout<<"array is full:";

                 exit();

             }

     }

}

Void main()

{

     string str;

    cout<<" Enter name:";

    getline(cin, str); ;

     citizen c1=new citizen();

     c1.addindividual(name1);

}

Explanation:

With a little more effort you can make the program allow the user to enter any number of details, but less than 30 overall. We have used here flag, and as a programmer we know why we use the Flag. It is used to check whether certain Boolean condition is fulfilled or not. Here, we are checking whether a given name is present in the array of names, and if it is not present, we add that to the list. And if the name is present, we print, it already exist.

4 0
2 years ago
Why are video games interesting?
TiliK225 [7]
Because there fun and helps boys get together or to get ur mind off of stuff
5 0
3 years ago
which of these describes a property of all elements A. all elements have six electrons B. all elements are pure substances C. al
sergiy2304 [10]
Im guessing the answer would either B or C
3 0
3 years ago
Name the types of computer used in hospital for computer​
disa [49]

Answer: These are all the computers they use All.

All In One Computers.

Medical Grade Computers.

Medical Tablets.

Medical Box PCs.

Medical Box PCs.

Displays & Monitors.

Medical Grade Monitors.

5 0
2 years ago
What are the major differences between searching and sorting in Java? What are some of the differences in the techniques used in
Studentka2010 [4]

Answer:  

  • Searching is a technique to look for an item or target value in a data structure like searching for a phone number in a directory.Data structure can be an array,List etc. Searching algorithms are used for searching. Most common examples are Linear Search and Binary Search. Lets take the example Linear Search in order to explain it using JAVA. Its the simplest searching algorithm. To search for a specific element, look at each element in the data structure sequentially and check if it matches with the element being searched for.
  • Sorting is a technique of arranging the elements in a specific order e.g. numerical sorting, ordering students according to their exam score. This order can be ascending or descending or alphabetical order. Contrary to search it returns the data structure e.g. an array in which the elements of array are sorted in a particular order. Sorting algorithms are used to sort elements in a data structure. Some common examples of sorting algorithms are Bubble Sort, Insertion Sort, Selection Sort, Merge Sort, Quick Sort, Heap Sort etc. JAVA uses Array.Sort() built-in function for sorting an array. By default it sorts the input array in ascending order.
  • Selection Sort: It is a sorting technique which divides an array into two subarrays. One subarray in the left is sorted and the other one at right is unsorted. This is an in-place algorithm. It is not a good option for large data. Initially the sorted part is empty and all elements are placed in unsorted array. First the element which is the smallest in the unsorted array is selected and swapped with the leftmost array element and becomes part of the sorted array. In each iteration the smallest element from the unsorted array is selected and moved to sorted part of the array.The worst case time complexity of this algorithm is O(n)^2 as we have to find the smallest for every element in the array.
  • Merge Sort: It is a comparison based algorithm. It works on divide and conquer technique. It uses recursion approach for sorting. This means it breaks the problem(lets say array list to be sorted) into sub problems (smaller parts) and then solves (in this case sorts) each sub problem in a recursive manner. At the end it merges the solutions (hence the merged sorted array). Although selection sort works faster when data set is small merge sort outperforms it for larger data sets. Merge sort is a stable algorithm and works best for linked lists. Its not an in place algorithm. Time complexity of merge sort is O(n*log n) for best, average and worst cases because it always divides the array in two parts and takes linear time to merge these part. O(n(logn)) time complexity makes it better,more efficient and faster to sort large data sets.
  •  Big Oh O notation is an asymptotic annotation written as O(n) which is a mathematical way to represent the upper bound of the running time of   algorithm (sorting algorithm in this case). It computes the worst case time complexity. Worst case time complexity means that the longest amount of time or maximum number of operations that will be required for a sorting algorithm to complete. The time complexity mostly gets affected as the size of the input varies.
  • For example lets find out the worst-case time complexity of Bubble Sort for a list of n elements. Worst case is when the array is reversed sorted. At first iteration it would make n-1 comparisons. At iteration 1, for n-2 times and so total comparison will be O(n^)2. So the time to run program is proportional to the square of the input size.
  • Searching algorithms are used when there is a need to find a specific data item from bulk of data item. Searching algorithms make this hectic process easier. For example you want to find phone number of person from directory. without searching algorithm looking for each phone number in the directory manually can be very time consuming. For example you have to find address of a customer number 254 from database to deliver a product. Instead  of manually looking for customer numbers you can simply use  linear search algorithm that will start from customer 1 and sequentially searches for specific customer 254 number and provides the address in a shorter time.
  • Sorting reduces complexity of problems e.g reducing the searching complexity. It is easier to locate data elements in a sorted list than unsorted. For example comparing two large data sets containing millions of records. If both the data sets are ordered, the comparison gets easier. Moreover every sorting algorithm has certain usage. Like merge sort is useful for linked lists,heap sort is good with arrays and uses less memory. If data is small with large values, selections sort is better for this. It doesn’t require any additional space. Databases use merge sort to arrange data that is too large to be loaded completely into memory.  Heap sort is used in reading bar codes on plastic cards. Quick sort is used to maintain sports score on the basis of win-loss ratio.
5 0
2 years ago
Other questions:
  • Gloria needs to show in spreadsheet form the number of students in her class who speak different languages. Which type of graph
    7·1 answer
  • Keeping in mind the role the order of precedence plays in equations, what would Excel display as the result of the following equ
    15·1 answer
  • Assume that the following method header is for a method in class A.
    15·1 answer
  • Please help!
    10·2 answers
  • What is the google search operator that limits results to a specific domain?
    8·1 answer
  • Can you help me, please
    10·1 answer
  • Output each floating-point value with two digits after the decimal point, which can be achieved by executing cout &lt;&lt; fixed
    7·1 answer
  • I NEED THIS ASAP PLS
    12·1 answer
  • Write a short-essay discussing your own stand on social media usage for students.​
    5·1 answer
  • in python i wrote a function where if the user inputs a certain word the function repeats over again, since the function aaks fo
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!