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

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

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