README for lab1 =============== For lab1, much of the discussion and directions were provided on the lab1 web page, but for most labs, the readme will contain all the instructions for the lab, so you'll fork/clone the lab then look at the readme to find out what to do next. Part 2: ------- (1) The command "ls -al filename" lists many of the properties of the specified file. Use the command shown below to look up the size of the README file in bytes, then write the vaue in your answers.txt file. ls -al READXME (2) The grep command can be used to find the lines in a file that contain a specific pattern. How many lines does the following command detect (put your answerr in the answers.txt file)? grep bytes README (3) We can use > to redirect the output of a command into a file. Try it with the following command: grep bytes README > part2.txt Similarly, we can use >> to add the output from a command to the end of an existing file, or < to take the input for a command from a file. (4) We can use the output from one command as the input for another using the | (pipe) symbol, and even combine that with < > and >> redirects. Try the following to sort the results of a grep and add it to the end of part2.txt: grep answers README | sort >> part2.txt Note: since (3) and (4) created/modified a new file, part2.txt, we'll need to remember to do a "git add part2.txt" the next time we do an add/commit. Part 3: ------- The answers to each of the following should go in your answers.txt file. (1) assuming a 12-bit 2's complement representation, give the binary, octal, and hex representations of 123, 47, 63, and -18 (2) assuming an 8-bit unsigned representation, (a) show the binary, hex, and decimal results of shifting 63 left 2 bits (b) show the binary, hex, and decimal results of shifting 63 right 2 bits