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
solong [7]
3 years ago
7

Compute (110110001.01)2 + (27.12)10 + (121.25)16 – (130.20)16 and display the answer in hexadecimal base.

Computers and Technology
1 answer:
mel-nik [20]3 years ago
8 0

Answer:

(110110001.01)₂ + (27.12)₁₀ + (121.25)₁₆ – (130.20)₁₆ = (445.38953125)₁₀ = (1BD.63B851EB851EB851EB85)₁₆

Explanation:

(110110001.01)₂ + (27.12)₁₀ + (121.25)₁₆ – (130.20)₁₆

leaving the answer in hexadecimal

To solve this, we first convert all the numbers to base 10, solve, then convert back to hexadecimal

(110110001.01)₂ = (1×2⁸) + (1×2⁷) + (0×2⁶) + (1×2⁵) + (1×2⁴) + (0×2³) + (0×2²) + (0×2¹) + (1×2⁰) + (0×2⁻¹) + (1×2⁻²) = (433.25)₁₀

(27.12)₁₀ = (27.12)₁₀

(121.25)₁₆ = (1×16²) + (2×16¹) + (1×16⁰) + (2×16⁻¹) + (5×16⁻²) = (289.14453125)₁₀

(130.20)₁₆ = (1×16²) + (3×16¹) + (0×16⁰) + (2×16⁻¹) + (0×16⁻²) = (304.125)₁₀

(110110001.01)₂ + (27.12)₁₀ + (121.25)₁₆ – (130.20)₁₆

= (433.25)₁₀ + (27.12)₁₀ + (289.14453125)₁₀ - (304.125)₁₀

= (445.38953125)₁₀

We then convert (445.38953125)₁₀ back to hexadecimal

(445.38953125)₁₀ = (1BD.63B851EB851EB851EB85)₁₆

16 | 445 | R

16 | 27 | 13 = D

16 | 1 | 11 = B

16 | 0 | 1 = 1

Read upwards, 1BD

Hope this Helps!!!

You might be interested in
A power supply unit for a computer converts:
Vinvika [58]
A power supply unit (or PSU) converts mains AC to low-voltage regulated DCpower for the internal components of acomputer. ... Some power supplies have a manual switch for selecting input voltage, while others automatically adapt to the mains voltage.
5 0
3 years ago
Write a program that unpickle's employee dictionary and while reading from the dictionary, it allows users to lookup an employee
melamori03 [73]

Answer:

Check the explanation

Explanation:

from Employee import *

import pickle

import random

def unpickle_employee(filename):

file=open(filename,'rb')

data=pickle.load(file)

file.close()

return data

def pickle_employee(data,filename):

file=open(filename,'wb')

pickle.dump(data,file)

file.close()

if __name__=='__main__':

filename="Employees.dat"

'''

E=Employee("Ajay",1,"R&D","Manager")

data={}

data[1]=E

pickle_employee(data,filename)

'''

data=unpickle_employee(filename)

 

while True:

print("\nData In Employee.dat")

for d in data:

print("Employe data: ",data[d].get_name(),"({},{},{})".

format(data[d].get_id_number(),data[d].get_department(),data[d].get_job_title()))

 

print("\n\n\t\tMenu")

print("To add new Employee, Enter a")

print("To update any Employee, Enter u")

print("To delete any Employee, Enter d")

print("Enter anything to quit")

choice=input("Enter: ")

if choice=='a':

id_number=random.randrange(100,200,1)

while id_number in data:

id_number+=1

if id_number>=200:

id_number=100

name=input("Enter the Name: ")

department=input("Enter the Department: ")

job_title=input("Enter the job title: ")

E=Employee(name,id_number,department,job_title)

data[id_number]=E

elif choice=='u':

id_number=int(input("Enter the Employee id_number to update: "))

for d in data:

print(id_number,d,d==id_number)

if id_number in data:

print("Employe data: ",data[id_number].get_name(),"({},{})".

format(data[id_number].get_department(),data[id_number].get_job_title()))

print("\nPlease Enter the details")

name=input("Enter the Name: ")

department=input("Enter the Department: ")

job_title=input("Enter the job title: ")

E=Employee(name,id_number,department,job_title)

data[id_number]=E    

else:

print("Employee doesn't exist\n")

elif choice=='d':

id_number=int(input("Enter the Employee id_number to delete: "))

if id_number in data:

print("Employe data: ",data[id_number].get_name(),"({},{})".

format(data[id_number].get_department(),data[id_number].get_job_title()))

choice=input("\nPlease Enter y to confirm, anything else to cancel: ")

if choice=='y':

del data[id_number]

else:

print("Employee doesn't exist\n")

else:

break

pickle_employee(data,filename)

7 0
3 years ago
Create an array of 10 fortune cookie sayings that will be randomly displayed each time the user reloads the page. The fortune wi
vfiekz [6]

Answer:

let cookieNumber = Math.floor(Math.random() * 10)

switch (cookieNumber) {

  case 1:

   document.write('Fortune 1')

   break;

  case 2:

   document.write('Fortune 2')

   break;

   case 3:

   document.write('Fortune 3')

   break;

  case 4:

   document.write('Fortune 4')

   break;

  case 5:

   document.write('Fortune 5')

   break;

  case 6:

   document.write('Fortune 6')

   break;

  case 7:

   document.write('Fortune 7')

   break;

  case 8:

   document.write('Fortune 8')

   break;

  case 9:

   document.write('Fortune 9')

   break;

  case 10:

   document.write('Fortune 10')

Explanation:

The cookieNumber is generated using Math.random(), which is rounded to a whole number using Math.floor(). Then, a switch block is used to display a different fortune depending on the value of cookieNumber.

4 0
3 years ago
Define a function typeHistogram that takes an iterator ""it"" (representing a sequence of values of different types) and builds
Alexeev081 [22]

Answer:

def typeHistogram(it,n):

   d = dict()

   for i in it:

       n -=1

       if n>=0:

           if str(type(i).__name__) not in d.keys():

               d.setdefault(type(i).__name__,1)

           else:

               d[str(type(i).__name__)] += 1

       else:

           break

   return list(d.items())

it = iter([1,2,'a','b','c',4,5])

print(typeHistogram(it,7))

Explanation:

  • Create a typeHistogram function that has 2 parameters namely "it" and "n" where "it" is an iterator used to represent a sequence of values of different types while "n" is the total number of elements in the sequence.
  • Initialize an empty dictionary and loop through the iterator "it".
  • Check if n is greater than 0 and current string is not present in the dictionary, then set default type as 1 otherwise increment by 1.
  • At the end return the list of items.
  • Finally initialize the iterator and display the histogram by calling the typeHistogram.
3 0
3 years ago
Respond to the following in three to five sentences. Select one netiquette guideline. Explain how this helps you draft more effe
slamgirl [31]

Answer:

Keeping as few emoji's as possible. This helps because lots of emoji's can make things confusing and/or annoying. This just means being kind to the person you're messaging and not making things confusing.

8 0
3 years ago
Other questions:
  • The ListIterator interface
    13·1 answer
  • Who was the first person to make a portable computer?
    5·1 answer
  • All of the following are recommended to secure a wireless network EXCEPT:
    5·2 answers
  • When information about a person remains on the internet indefinitely it is known as?
    6·1 answer
  • What is the purpose of a career portfolio?
    6·1 answer
  • Given a constant named size with a value of 5, which statement can you use to define and initialize an array of doubles named ga
    12·1 answer
  • Neymar machine that Run on electricity
    11·1 answer
  • Type the correct answer in the box. Spell all words correctly.
    13·1 answer
  • The central point of Christian belief is that God, the Father, entered into human history as the
    15·1 answer
  • How does the dns help the world wide web scale so that billions of users can access billions of web pages?.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!