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
Over [174]
4 years ago
6

There is a simple pattern for determining if a binary number is odd. What is it and why does this pattern occur

Computers and Technology
2 answers:
kramer4 years ago
8 0
The rightmost digit is the one's digit ( 2^0 ). If it's set, the number is odd, else it's even.
andrew-mc [135]4 years ago
6 0

The answer to this question would be the least number (right most number). If the last digit of a binary number is 1, the number is odd; if it’s 0, the number is even.  If you add an even number with even number, the result should be even. But if there is just one odd number added, it will be odd. In binary, all the number is multiplied by 2x. It is pretty clear that all the number should be even beside the first/lowest multiplier   which has potential to be 1.  Everything about the binary number system is the same as the decimal number system with just one difference: the base is 2 instead of 10.

Further Explanation:-

Binary number system

Binary means base 2(note the prefix bi). Base 2 (binary) has 2 digits: 0, 1. since binary numbers are made up of binary digits, we often call a binary digit a bit (short for binary digit). We may also refer to a place value position as a bit. In other words, the binary number '1010' requires 4 bits to write, and those bits are '1', '0', '1' and '0'.For any number system that has a base b, the first b non-negative numbers are represented by the digits themselves. For base b=2 (binary), the first 2 numbers are 0 and 1.Counting in binary is just like counting in decimal, except that you run out of digits much more quickly and have to resort to more value places sooner. To count the number of eggs in a dozen in binary would be as follows: 0, 1, 10, 11, 100, 101, 110, 111, 1000, 1001, 1010, 1011, 1100.  

Example:  

1101 represents an odd number (13); 10010 represents an even number (18).  To convert a binary number to base 2k , split it into groups of k digits (adding leading 0s if necessary), then convert each group to base 2k . Ex: Convert the number 1001011111 to base 8. First, note that 8 = 23 , so we should split the number into groups of 3 digits: 001 001 011 111 Note that we added two leading 0s to make the number of digits a multiple of 3. Next, we convert each group of 3 digits to base 8: 001 001 011 111 1 1 3 7 Thus, the number in base 8 is 1137.

Learn more:

  • What is the binary answer to the binary number 100 added to the binary number 11?

         brainly.com/question/6561005

Keywords:  binary, number system, decimal, conversion, even binary number, odd binary.

You might be interested in
Which line of code in this program is MOST likely to result in an error
rjkz [21]

Answer:

What are the choices?

Explanation:

7 0
3 years ago
Read 2 more answers
You can use pen and highlighter tools to emphasize information on a slide during a PowerPoint presentation. These tools are avai
Savatey [412]
ANSWER:
C. Slide Show toolbar
5 0
4 years ago
Write a program that prompts the user to enter two characters and display the corresponding major and year status. The first cha
nydimaria [60]

Answer:

  1. import java.util.Scanner;  
  2. public class Main {
  3.    public static void main(String[] args) {
  4.        Scanner input = new Scanner(System.in);
  5.        System.out.print("Please enter two characters: ");
  6.        String inputStr = input.nextLine();
  7.        if(inputStr.charAt(0) == 'B' || inputStr.charAt(0) == 'b'){
  8.            System.out.println("Biology");
  9.        }
  10.        else if(inputStr.charAt(0) == 'C' || inputStr.charAt(0)== 'c'){
  11.            System.out.println("Computer Science");
  12.        }
  13.        else if(inputStr.charAt(0) == 'I' || inputStr.charAt(0) == 'i')
  14.        {
  15.            System.out.println("Information Technology and Systems");
  16.        }
  17.        else{
  18.            System.out.println("Invalid major");
  19.        }
  20.        int num = Character.getNumericValue(inputStr.charAt(1));
  21.        if(num >= 1 && num <= 4){
  22.            switch (num){
  23.                case 1:
  24.                    System.out.println("freshman");
  25.                    break;
  26.                case 2:
  27.                    System.out.println("sophomore");
  28.                    break;
  29.                case 3:
  30.                    System.out.println("junior");
  31.                    break;
  32.                case 4:
  33.                    System.out.println("senior");
  34.                    break;
  35.            }
  36.        }
  37.        else{
  38.            System.out.println("Invalid year status");
  39.        }
  40.    }
  41. }

Explanation:

The code consists of two main parts. The part 1 is to validate the input major and print out the major according to the input character (Line 10 -22). If the input character is not matched with the target letters, a message invalid major will be displayed.

The part 2 is to validate the year status to make sure it only fall within the range of 1-4  (Line 26 -45). If within the range, the program will display the year major accordingly. If not a message invalid year status will be displayed.

4 0
4 years ago
What is the legal right granted to all authors and artists that gives them sole ownership and use of their words, software, pict
ICE Princess25 [194]

Answer:

copyright

Explanation:

3 0
4 years ago
write a program that keeps names and email addresses in a dictionary as key-value pairs. the program should display a menu that
erma4kov [3.2K]

To write a program that keeps names and email addresses in a dictionary as key-value pairs check the code given below.

<h3>What is key-value pairs?</h3>

In a key-value pair, two related data elements are combined: a value, which is a variable that belongs to the set (for example, male/female, green, 100), and a key, which is a constant that defines the data set (for example, gender, color, price).

A key-value pair could look something like this when fully formed:

gender = male

color = green

price > 100

↓↓↓//<u>Python code</u>//↓↓↓

import pickle

import sys

try:

   f=open('email.dat','rb')

   d=pickle.load(f)  

   f.close()

     

except:    

   d={}

while True:

   print('\n1. Find a email address')

   print('2. Add name and email address')

   print('3. Change an email address')

   print('4. Delete an email address')

   print('5. Exit\n')

   choice=input('\nEnter a choice: ')

   if choice:

       choice=int(choice)

   else:

       print('\nEnter a number')

       continue    

   if choice == 1:

       while True:

           name=input('\nEnter the name ')

           if name:

               if name in d:

                   print('\n%s is the email id of %s \n' % (d[name],name))

                   break

               else:

                   print('\n Email not found \n')

                   break

           else:

               print('\nName cannot be empty\n')

               continue

           

   elif choice==2:

       while True:            

       

           name=input('\nEnter the name ')

           if name:

               break;

           else:

               print('\nName cannot be empty \n')

               continue

       while True:            

       

           email=input('\nEnter the email address ')

           if email:

               d[name]=email

               break

           else:

               print('\nEmail cannot be empty\n')

               continue

           

   elif choice==3:

       while True:            

       

           name=input('\nEnter the name to change the email address ')

           if name:

               if name in d:

                   email=input('\nEnter the new email address ')

                   d[name]=email

                   print('\nEmail address changed \n')

                   break;

               else:

                   print('\nName not found \n')

                   break

           else:

               print('\nName cannot be empty \n')

               continue

           

   elif choice == 4:

       while True:            

       

           name=input('\nEnter the name to remove ')

           if name:

               if name in d:

                   del d[name]

                   print('\nName and Email address removed \n ')

                   break;

               else:

                   print('\nName not found \n')

                   break

           else:

               print('\nName cannot be empty\n')

               continue

   elif choice == 5:

       

       f=open('email.dat','wb')

       pickle.dump(d,f)

       f.close()

       sys.exit()

   else:

       print('\nEnter a valid choice ')    

Learn more about key-value pair

brainly.com/question/29414672

#SPJ1

3 0
1 year ago
Other questions:
  • Which markup language would be considered the most current for web design? HTLM, HTML5, XHTLM, XHTML 6
    14·2 answers
  • What does iSCSI stand for?
    5·2 answers
  • To refine the in-between motions, a computer animator uses a mathematical function called a(n)
    14·1 answer
  • why do programs include keyboard shortcuts for certain actions? do you prefer the mouse or the keyboard/ why?
    7·1 answer
  • Once sales are​ forecasted, ________ must be generated to estimate required raw materials. A. a pro forma statement B. a product
    8·1 answer
  • Consider the following code snippet: int count = 0; int[][] numarray = new int[2][3]; for (int i = 0; i &lt; 3; i++) { for (int
    15·1 answer
  • Add the following method to the Point class: public double distance(Point other) Returns the distance between the current Point
    12·1 answer
  • Would you consider upgrading Maxine’s wardrobe a need or a want?
    11·1 answer
  • What the central difference between negative and positive politeness?
    13·2 answers
  • Aaaaaaaaaaaaaaaaplssssssssssssssssssssssssssssshelpppppppppppppppppppppppp
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!