The following syntax diagrams for a particular programming language show the syntax of: • an unsigned number • an unsigned integer • a digit. Unsigned integer Unsigned number . Unsigned integer Digit Unsigned integer Digit Explain why 32 is a valid unsigned integer. Explain why 32.5 is a valid unsigned number. Complete the Backus-Naur Form (BNF) for the syntax diagrams shown. ::= ::= ::= The format of an unsigned number is amended to include numbers with possible exponents. If an unsigned number has an exponent, then the exponent part: • will start with an ‘E’ • be followed by an optional ‘+’ or ‘−’ sign • and be completed by an unsigned integer. Examples of unsigned numbers with exponents include: 3E2, 3E+3, 3E−32, 3.45E−2 Redraw the syntax diagram for unsigned number to include numbers that might have exponents. Use your syntax diagram from part to write the BNF for an unsigned number to include numbers with exponents. ::= 9608_w17_qp_32 THEORY 2017 Paper 3, Variant 2 View
Wei is developing a program. He wants to make sure the source code is secure on his laptop. Explain how encrypting the source code can keep it secure. Wei wants to compress the source code to transport it to another computer. Identify the most appropriate compression technique he should use. Justify your choice. Compression technique Justification 9608_s20_qp_13 THEORY 2020 Paper 1, Variant 3 View