Cmpen 270 Fall 2016 Assignment 1 Instructions: The Solution ✓ Solved

Cmpen 270 Fall 2016assignment 1instructions1 The Solutio

Convert the following decimal numbers to binary, show work a) 2410 b) 3010 c) 11110 d) . Convert the following binary numbers to decimal, show work a) b) 110112 c) 1010102. Convert the following, show work: a) Decimal 225.5 to binary, octal, and hexadecimal b) Binary 110.110 to decimal, octal, and hexadecimal c) Octal 620.77 to decimal, binary, and hexadecimal d) Hexadecimal 2AD5.D to decimal, octal, and binary. Use 1’s complement to compute the following subtractions in parts (a) and (b), show work: a) – b) – c) Use 2’s complement to compute the same subtractions in parts (a) and (b), show work: The logic circuit proposed by an engineer was found to be flawed. Explain why the boss was disappointed and show all work. You are given four signed integers in different number bases: A = +(7A)16, B = -8>, C = (104)10, D = +(a). What is the smallest number of bits (n) needed to represent all these in 2’s complement? What are the maximum and minimum values possible? What are the n-bit representations of these four numbers? Compute C + D using 2’s complement arithmetic and explain whether this is expected. For a program task, write a C++ program that prompts for input and output filenames, processes each line to add line numbers, count paragraphs, lines, words, and characters (with and without spaces), and writes a summary. You must define functions for counting characters, words, identifying paragraphs, and parsing files. The program should match the sample output provided, processing files like savio.txt and kennedy.txt, with a 10% variance acceptable in statistics. Additionally, include a reflection essay of at least 350 words discussing your challenges, insights, and advice related to the assignment. Submit your work by the deadline, following proper code style and including your header information. The grading criteria include output correctness, style adherence, and the quality of your reflection.