Write a program to perform unsigned binary eight-bit

Assignment Help Programming Languages
Reference no: EM131321759

Program 1: write a program that asks user to enter a year and this program checks whether that year is leap year or not. Also it should print out all a calendar for the year entered. Starting on Monday Jan 1st, 1900. Characteristic of a leap year: • It has 366 days. • February has 29 days. • February starts and ends on the same day. • January, April, and July, all start on the same day of the week. Definition: • A leap year can always be evenly divided by 4. For example, 2012 was a leap year. • But a year is not a leap year if it can be evenly divided by 100 but cannot also be evenly divided by 400. This is why 1600 and 2000 are leap years, but 1700, 1800, and 1900 are not. • A leap year can always be evenly divided by 4. • Century years must also be divisible by 400. Pseudo code algorithm: if year is divisible by 4 then if year is divisible by 100 then if year is divisible by 400 then IS_leap_year else NOT_leap_year else IS_leap_year else NOT_leap_year Let D4 = year divisible by 4 D100 = year divisible by 100 D400 = year divisible by 400 From the definition: D4 Λ (D100 → D400) ⇔ D4 Λ (¬D100 V D400) ⇔ (D4 Λ ¬D100) V (D4 Λ D400) ⇔ (D4 Λ ¬D100) V (D400) ⇔ D400 V (D4 Λ ¬D100) ⇔ D400 V (¬D100 Λ D4) or D4 Λ (¬D100 V (D100 Λ D400)) ⇔ (D4 Λ ¬D100) V (D4 Λ D100 Λ D400) ⇔ (D4 Λ ¬D100) V (D400) ⇔ D400 V (¬D100 Λ D4) IS_leap_year = D400 V (¬D100 Λ D4)

2. Write a program to perform unsigned binary 8-bit to decimal conversion and decimal to binary conversion.

Reference no: EM131321759

Questions Cloud

Approaches the earth with a speed : Spacecraft I, containing students taking a physics exam, approaches the Earth with a speed of 0.700c (relative to the Earth), while spacecraft II, containing professors proctoring the exam, moves at 0.300c (relative to the Earth) directly toward t..
Analyze the aspect of human culture you selected for each : Anthropologists are interested in framing broad hypotheses about human behavior. In order to do this, it is imperative to use examples from multiple cultures to ensure that their conclusions are not grounded in a single case.
What are linear relationship and a curvilinear relationship : When are correlational research designs used in behavioral research? What are their advantages and disadvantages?
Discuss differences between a firewall and a packet filter : Show how data protocols such as TCP, UDP, and ICMP can be implemented in a firewall and give the type of firewall best suited for each of these protocols.
Write a program to perform unsigned binary eight-bit : Write a program to perform unsigned binary 8-bit to decimal conversion and decimal to binary conversion. Write a program that asks user to enter a year and this program checks whether that year is leap year or not.
How these enhancements are achieved : Kerberos and SSL are additional layers to enhance authentication. Detail how these enhancements are achieved in both cases.
How much value does the use of debt add : Under the MM extension with growth, what is the value of your firm's tax shield, i.e., how much value does the use of debt add?
Examine how and why migration is increasing globally : Globalization has caused extensive shifts in the mobility of people between countries. Economics, political shifts, and increased opportunities for travel have made migration and immigration pervasive. This assignment will explore immigration patt..
Is the role of pki in authentication exaggerated : Discuss the bene fits of enhancement of basic authentication with a cryptographic scheme such as Kerberos, SSL, and others. Give specific examples.

Reviews

Write a Review

Programming Languages Questions & Answers

  Create logic for program-continously prompts for numeric

Create the logic for a program that continously prompts the user for two numeric values that represent the sides of a rectangle.

  Write a program that uses is and else or if and elsif

write a program that uses is and else or if and elsif conditional statementsthat asks the user to enter a value for

  Output of the given program

Output of the given program - using namespace std - g^x = h mod p, find x. ex: 7^x = 15 mod 41, x = 3

  Write a program to find solutions to the n-queens puzzle

Write a program to find solutions to the n-queens puzzle for various valuesof n. To be specific, test your program for n =4 and n =8.

  Determine the purpose of using javascriptr on a website

write a 200- to 300-word short-answer response to the followingwhat is the purpose of using javascriptr on a website?

  Create a small program that uses conditions and loops

Control flow enables you to easily add conditions and loops to your programs. In this task you will create a small program that uses conditions and loops to output custom messages to users.

  Write grading program to find letter grade from exam score

Write pseudo code based on the analysis. Write a grading program which helps to determine your letter grade based on your exam score.

  What is the height of the retinal image

Create a binary image at least 64x64 in dimensions. Using Octave's existing functions, perform Average, Gaussian and Laplacian filters on the image. Display the original image and each of the filtered images in Octave plots. Discuss and compare your..

  Write a program for an automatic teller machine

Write a program for an automatic teller machine that dispenses money. Write a separate function of type void that accepts the amount to dispense and returns the number of bills for each denomination.

  Write a program that converts english units to metric

Write a unit conversion program that converts English units to Metric using the conversion table given above. Ask the user from which unit they want to convert ( oz, lb, in, ft, mi) and which unit they want to convert to (g, kg, cm, and km).

  Assignment program on crawler game

Update the Crawler game attached to allow a user to traverse the Cave. They should be prompted in each room to pick an exit or quit

  Programming problem

Programming Problem can be solved by a program that performs three basic tasks-Input Data, Process Data, and Output Results.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd