Design and Debug: Essen.al Concepts Numerical Conversions CS 16: Solving Problems with Computers Lecture #7

Similar documents
Design and Debug: Essen.al Concepts CS 16: Solving Problems with Computers I Lecture #8

Compiling with Multiple Files The Importance of Debugging CS 16: Solving Problems with Computers I Lecture #7

Call- by- Reference Func0ons Procedural Abstrac0ons Numerical Conversions CS 16: Solving Problems with Computers I Lecture #9

Designing Loops and General Debug Pre-Defined Functions in C++ CS 16: Solving Problems with Computers I Lecture #6

Overloading Functions & Command Line Use in C++ CS 16: Solving Problems with Computers I Lecture #6

More Examples Using Functions and Command-Line Arguments in C++ CS 16: Solving Problems with Computers I Lecture #6

Vectors and Pointers CS 16: Solving Problems with Computers I Lecture #13

Binary Arithme-c CS 64: Computer Organiza-on and Design Logic Lecture #2

Numerical Conversions Intro to Strings in C/C++ CS 16: Solving Problems with Computers I Lecture #8

More on Arrays CS 16: Solving Problems with Computers I Lecture #13

Arrays 2 CS 16: Solving Problems with Computers I Lecture #12

Unit 7. 'while' Loops

More on Strings in C++ Arrays CS 16: Solving Problems with Computers I Lecture #11

Solving Problems Flow Control in C++ CS 16: Solving Problems with Computers I Lecture #3

Programming with Arrays Intro to Pointers CS 16: Solving Problems with Computers I Lecture #11

Func%ons in C++ Part 2 CS 16: Solving Problems with Computers I Lecture #5

Call-by-Type Functions in C++ Command-Line Arguments in C++ CS 16: Solving Problems with Computers I Lecture #5

Compiling C++ Programs Flow Control in C++ CS 16: Solving Problems with Computers I Lecture #3

File Input / Output Streams in C++ CS 16: Solving Problems with Computers I Lecture #9

Character Functions & Manipulators Arrays in C++ CS 16: Solving Problems with Computers I Lecture #10

Chapter void Functions. Overview. Functions for All Subtasks. void-functions. Using a void-function. void-function Definition

Chapter 3. More Flow of Control. Copyright 2008 Pearson Addison-Wesley. All rights reserved.

Pre- Defined Func-ons in C++ Review for Midterm #1

More Flow Control Functions in C++ CS 16: Solving Problems with Computers I Lecture #4

Introduc)on to C++ CS 16: Solving Problems with Computers I Lecture #2

Introduc)on to Arrays in C++ Review for Midterm #2 CS 16: Solving Problems with Computers I Lecture #12

Binary Arithmetic CS 64: Computer Organization and Design Logic Lecture #2 Fall 2018

Algorithms for Arrays Vectors Pointers CS 16: Solving Problems with Computers I Lecture #14

CS101: Fundamentals of Computer Programming. Dr. Tejada www-bcf.usc.edu/~stejada Week 1 Basic Elements of C++

Advanced Flow Control CS 16: Solving Problems with Computers I Lecture #5

More on Func*ons Command Line Arguments CS 16: Solving Problems with Computers I Lecture #8

Introduction to C++ General Rules, Conventions and Styles CS 16: Solving Problems with Computers I Lecture #2

Binary Arithmetic CS 64: Computer Organization and Design Logic Lecture #2

MIPS Instruc,ons CS 64: Computer Organiza,on and Design Logic Lecture #8

Discussion 1H Notes (Week 3, April 14) TA: Brian Choi Section Webpage:

Flow Control in C++ Condi&onals & Loops CS 16: Solving Problems with Computers I Lecture #4

Chapter 3. More Flow of Control

int n = 10; int sum = 10; while (n > 1) { sum = sum + n; n--; } cout << "The sum of the integers 1 to 10 is " << sum << endl;

Chapter Overview. More Flow of Control. Flow Of Control. Using Boolean Expressions. Using Boolean Expressions. Evaluating Boolean Expressions

Chapter 3. More Flow of Control. Copyright 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Linked Lists CS 16: Solving Problems with Computers I Lecture #16

Welcome to Solving Problems with Computers I

1010 2?= ?= CS 64 Lecture 2 Data Representation. Decimal Numbers: Base 10. Reading: FLD Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9

Strings in Python: Cipher Applications CS 8: Introduction to Computer Science, Winter 2018 Lecture #9

Flow Control in C++ 1 CS 16: Solving Problems with Computers I Lecture #4

Welcome to Computer Organization and Design Logic CS 64: Computer Organization and Design Logic Lecture #1 Winter 2018

Computer Programming. Basic Control Flow - Loops. Adapted from C++ for Everyone and Big C++ by Cay Horstmann, John Wiley & Sons

Dynamic Arrays Makefiles and Mul3ple File Compiles

CS31 Discussion 1E. Jie(Jay) Wang Week1 Sept. 30

Program Verification (Rosen, Sections 5.5)

Fundamentals of Structured Programming

Function Calling Conventions 2 CS 64: Computer Organization and Design Logic Lecture #10

Slide Set 1. for ENEL 339 Fall 2014 Lecture Section 02. Steve Norman, PhD, PEng

More on File I/O Strings in C++ CS 16: Solving Problems with Computers I Lecture #10

File Input/Output Streams in C++ CS 16: Solving Problems with Computers I Lecture #10

MIPS Assembly: More about MIPS Instructions Using Functions in MIPS CS 64: Computer Organization and Design Logic Lecture #8

Functions and the MIPS Calling Convention 2 CS 64: Computer Organization and Design Logic Lecture #11

Lesson 2 Variables and I/O

More Course Overview: Models, Tests, Bugs, and Symbols

The American University in Cairo Department of Computer Science & Engineering CSCI &09 Dr. KHALIL Exam-I Fall 2011

The American University in Cairo Department of Computer Science & Engineeringt CSCI &09 Dr. KHALIL Exam-I Fall 2009

Exam 1. CSI 201: Computer Science 1 Fall 2018 Professors: Shaun Ramsey

Proofs about Programs

Operations. Making Things Happen

Basic Data Types and Operators CS 8: Introduction to Computer Science, Winter 2019 Lecture #2

Lecture 9: Potpourri: Call by reference vs call by value Enum / struct / union Advanced Unix

File I/O in Python CS 8: Introduction to Computer Science Lecture #11

Exercises with Linked Lists CS 16: Solving Problems with Computers I Lecture #15

(More) Fun with Pointers and Linked Lists! CS 16: Solving Problems with Computers I Lecture #17

PASS$MOCK$EXAM$ $FOR$PRACTICE$ONLY$

Lab: Supplying Inputs to Programs

o Counter and sentinel controlled loops o Formatting output o Type casting o Top-down, stepwise refinement

Review: Exam 1. Your First C++ Program. Declaration Statements. Tells the compiler. Examples of declaration statements

Welcome to Computer Organization and Design Logic

Octal & Hexadecimal Number Systems. Digital Electronics

File I/O CS 16: Solving Problems with Computers I Lecture #9

GE U111 Engineering Problem Solving & Computation Lecture 6 February 2, 2004

MIPS and Basic Assembly Language CS 64: Computer Organization and Design Logic Lecture #4

CSE 143. Programming is... Principles of Programming and Software Engineering. The Software Lifecycle. Software Lifecycle in HW

C++ Basics 1 CS 16: Solving Problems with Computers I Lecture #3

CSCE 206: Structured Programming in C++

Structures and Classes CS 16: Solving Problems with Computers I Lecture #15

Strings in Python: Cipher Applications CS 8: Introduction to Computer Science Lecture #7

Increment and the While. Class 15

ques4ons? Midterm Projects, etc. Path- Based Sta4c Analysis Sta4c analysis we know Example 11/20/12

Programming in C++ Prof. Partha Pratim Das Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Instructor: Randy H. Katz hap://inst.eecs.berkeley.edu/~cs61c/fa13. Fall Lecture #7. Warehouse Scale Computer

CSCI 1061U Programming Workshop 2. C++ Basics

Common Loop Algorithms 9/21/16 42

CS102 C++ Exception Handling & Namespaces

BBM 101 Introduc/on to Programming I Fall 2014, Lecture 5. Aykut Erdem, Erkut Erdem, Fuat Akal

File I/O and String Manipula3ons CS 16: Solving Problems with Computers I Lecture #11

CS31 Discussion 1E. Jie(Jay) Wang Week3 Oct.12

CIS220 In Class/Lab 1: Due Sunday night at midnight. Submit all files through Canvas (25 pts)

Introduction to C++ 2. A Simple C++ Program. A C++ program consists of: a set of data & function definitions, and the main function (or driver)

BITG 1233: Introduction to C++

Chapter 17 - Notes Recursion

MIPS Assembly: Practice Questions for Midterm 1 Saving to and Loading from Memory CS 64: Computer Organization and Design Logic Lecture #6

Using the MIPS Calling Convention. Recursive Functions in Assembly. CS 64: Computer Organization and Design Logic Lecture #10 Fall 2018

Agenda. Address vs. Value Consider memory to be a single huge array. Review. Pointer Syntax. Pointers 9/9/12

Transcription:

Design and Debug: Essen.al Concepts Numerical Conversions CS 16: Solving Problems with Computers Lecture #7 Ziad Matni Dept. of Computer Science, UCSB

Announcements We are grading your midterms this week! So far, so good A reminder about Labs Please make sure to SIGN IN (or you will be counted as absent) Please make sure to COLLECT YOUR HW in lab Next lab is a required pair programming assignment You are required to work with a partner for Lab 5 (next week) More on that later 10/24/17 Matni, CS16, Fa17 2

Programming and submit.cs: The Devil is in the Details 10/24/17 Matni, CS16, Fa17 3

Lecture Outline Design and Debug Tips Designing and Debugging Loops The Mighty TRACE Designing and Debugging Func_ons Numerical Conversions The Posi_onal Nota_on Going from Binary to Decimal (and Octal, and Hexadecimal) Going from Decimal to anything 10/24/17 Matni, CS16, Fa17 4

Designing Loops What do I need to know? What am I doing inside the loop? What are my ini.alizing statements? What are the condi.ons for ending the loop? 10/24/17 Matni, CS16, Fa17 5

Exit on Flag Condi_on Loops can be ended when a par_cular flag condi_on exists Applies to while and do- while loops Flag: A variable that changes value to indicate that some event has taken place Examples of exit on a flag condi_on for input List ended with a sen_nel value Running out of input 10/24/17 Matni, CS16, Fa17 6

Exit on Flag Example Consider this loop to iden_fy a student with a grade of 90 or beder and think of how it s logically limited. int n = 1; //student ID number grade = compute_grade(n); // compute_grade() is a function while (grade < 90) { } grade = compute_grade(n); cout <<"Student number "<< n <<" has a score of " << grade << endl; n++; 10/24/17 Matni, CS16, Fa17 7

The Problem The loop on the previous slide might not stop at the end of the list of students if no student has a grade of 90 or higher! int n = 1; //student ID number grade = compute_grade(n); // compute_grade() is a function while (grade < 90) { grade = compute_grade(n); cout <<"Student number "<< n <<" has a score of " << grade << endl; n++; } It is a good idea to use a second flag to ensure that there are s_ll students to consider The code on the following slide shows a beder solu_on 10/24/17 Matni, CS16, Fa17 8

Exit on Flag Example int n = 1; //student ID number grade = compute_grade(n); // compute_grade() is a function while ( (grade < 90) && ( n < number_of_students) ) { grade = compute_grade(n); cout <<"Student number "<< n <<" has a score of " << grade << endl; n++; } 10/24/17 Matni, CS16, Fa17 9

Debugging Loops Common errors involving loops include: Off- by- one errors in which the loop executes one too many or one too few _mes Infinite loops usually result from a mistake in the Boolean expression that controls the loop 10/24/17 Matni, CS16, Fa17 10

Fixing Off- By- One Errors Check your comparison: should it be < or <=? Saw a few mistakes like this on the exam L Check that the var. ini_aliza_on uses the correct value 10/24/17 Matni, CS16, Fa17 11

Fixing Infinite Loops Common mistake: check the direc_on of inequali_es: should I use < or >? Test for < or > in your loops, rather than equality (==) or inequality (!=) 10/24/17 Matni, CS16, Fa17 12

More Loop Debugging Tips: Tracing Be sure that the mistake is really in the loop Trace the variable to observe how it changes Tracing a variable is watching its value change during execu_on. Best way to do this is to insert cout statements and have the program show you the variable at every itera_on of the loop. 10/24/17 Matni, CS16, Fa17 13

Debugging Example The following code is supposed to conclude with the variable product equal to the product of the numbers 2 through 5 i.e. 2 x 3 x 4 x 5, which, of course, is 120. What could go wrong?! J Where might you put a trace? int next = 2, product = 1; while (next < 5) { next++; product = product * next; } DEMO! Using variable tracing 10/24/17 Matni, CS16, Fa17 14

Loop Tes_ng Guidelines Every.me a program is changed, it should be re- tested Changing one part may require a change to another Every loop should at least be tested using input to cause: Zero itera_ons of the loop body One itera_on of the loop body One less than the maximum number of itera_ons The maximum number of itera_ons If all of these are ok, you likely have a very robust loop 10/24/17 Matni, CS16, Fa17 15

Star_ng Over Some_mes it is more efficient to throw out a buggy program and start over! The new program will be easier to read The new program is less likely to be as buggy You may develop a working program faster than if you work to repair the bad code The lessons learned in the buggy code will help you design a beder program faster 10/24/17 Matni, CS16, Fa17 16

Tes_ng and Debugging Func.ons Each func_on should be tested as a separate unit Tes_ng individual func_ons facilitates finding mistakes Driver Programs allow tes_ng of individual func_ons Once a func_on is tested, it can be used in the driver program to test other func_ons 10/24/17 Matni, CS16, Fa17 17

Example of a Driver Test Program 10/24/17 Matni, CS16, Fa17 18

Stubs When a func_on being tested calls other func_ons that are not yet tested, use a stub A stub is a simplified version of a func;on Stubs usually provide values for tes.ng rather than perform the intended calcula_on i.e. they re fake func.ons Stubs should be so simple that you have full confidence they will perform correctly 10/24/17 Matni, CS16, Fa17 19

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 #include <iostream> #include <cmath> use namespace std; double WeirdCalc(double x, double y); int main( ) { double n, m, w; cout << Enter the 2 values for weird calculation: ; cin >> n >> m; w = WeirdCalc(n, m) / (37 pow(n/m, m/n) ); cout << The answer is: << w << endl; return 0; } Stub Example double WeirdCalc(double x, double y) { return ( (sqrt(pow(3*x, y%(max(x,y))) sqrt(5*y/(x- 6)) + 0.5*pow((x+y), - 0.3); } 10/24/17 Matni, CS16, Fa17 20

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 #include <iostream> #include <cmath> use namespace std; double WeirdCalc(double x, double y); int main( ) { double n, m, w; cout << Enter the 2 values for weird calculation: ; cin >> n >> m; w = WeirdCalc(n, m) / (37 pow(n/m, m/n) ); cout << The answer is: << w << endl; return 0; } Stub Example double WeirdCalc(double x, double y) // Make WeirdCalc a stub just for testing!! { //return ( (sqrt(pow(3*x, y%(max(x,y))) sqrt(5*y/(x- 6)) + 0.5*pow((x+y), - 0.3); return ( 7 ); } 10/24/17 Matni, CS16, Fa17 21

Debugging Your Code Keep an open mind Don t assume the bug is in a par_cular loca_on Don t randomly change code without understanding what you are doing un_l the program works This strategy may work for the first few small programs you write but it is doomed to failure for any programs of moderate complexity Show the program to someone else 10/24/17 Matni, CS16, Fa17 22

General Debugging Techniques Check for common errors, for example: Local vs. Reference Parameters = instead of == Did you use && when you meant? These are typically errors that might not get flagged by a compiler Localize the error Narrow down bugs by using cout statements to reveal internal (hidden) values of variables Once you reveal the bug and fix it, remove the cout statements Your textbook has great debugging examples 10/24/17 Matni, CS16, Fa17 23

Example from the Midterm cout << "Enter 2 integer numbers. To quit, make either of them zero: "; cin >> num1 >> num2; while ( (num1!= 0) && (num2!= 0) ) { if (num1 > num2) cout << "The sum is: " << num1 + num2 << endl; else if (num1 < num2) cout << "The product is: " << num1*num2 << endl; else cout << "You entered the same number, " << num1 << endl; cout << "Enter 2 integer numbers. To quit, make either of them zero: "; cin >> num1 >> num2; } // end while cout << "Goodbye!"; Matni, CS16, Fa17 24

Example from the Midterm cout << "Enter 2 integer numbers. To quit, make either of them zero: "; cin >> num1 >> num2; Because you want the cases when either var is zero. That is, if num1 is zero it doesn t maier what num2 is doing just quit (same for if num2 is zero) while ( (num1!= 0) && (num2!= 0) ) { if (num1 > num2) cout << "The sum is: " << num1 + num2 << endl; else if (num1 < num2) cout << "The product is: " << num1*num2 << endl; else cout << "You entered the same number, " << num1 << endl; cout << "Enter 2 integer numbers. To quit, make either of them zero: "; cin >> num1 >> num2; } // end while cout << "Goodbye!"; Otherwise, if you use the operator, then you are saying that while either var is zero, keep going thru the loop this is not the intended design!!! Matni, CS16, Fa17 25

Other Debugging Techniques Use a debugger tool Typically part of an IDE (integrated development environment) Allows you to stop and step through a program line- by- line while inspec_ng variables Use the assert macro Can be used to test pre or post condi_ons #include <cassert> assert(boolean expression) If the Boolean is false then the program will abort Not a good idea to keep in the program once you re done w/ it!!! 10/24/17 Matni, CS16, Fa17 26

Assert Example Denominator should not be zero in Newton s Method 10/24/17 Matni, CS16, Fa17 27

Pre- and Post- Condi_ons Concepts of pre- condi;on and post- condi;on in func;ons The textbook recommends you use these concepts when making comments Pre- condi.on: What must be before you call a func.on States what is assumed to be true when the func_on is called Func_on should not be used unless the precondi_on holds Post- condi.on: What the func.on will do once it is called Describes the effect of the func_on call Tells what will be true aqer the func_on is executed (when the precondi_on holds) If the func_on returns a value, that value is described Changes to call- by- reference parameters are described 10/24/17 Matni, CS16, Fa17 28

Why use Pre- and Post- condi_ons? Pre- condi_ons and post- condi_ons should be the first step in designing a func_on Specify what a func_on should do BEFORE designing it This minimizes design errors and _me wasted wri_ng code that doesn t match the task at hand Read textbook s Supermarket Pricing case study Ch. 5, from pg. 276 281 10/24/17 Matni, CS16, Fa17 29

Numerical Conversions in CS 10/24/17 Matni, CS16, Fa17 30

Coun_ng Numbers in Different Bases We normally count in 10s Base 10: decimal numbers Number symbols are 0 thru 9 Computers count in 2s Base 2: binary numbers Number symbols are 0 and 1 Represented with 1 bit (2 1 = 2) Other convenient bases in computer architecture: Base 8: octal numbers Number symbols are 0 thru 7 Represented with 3 bits (2 3 = 8) Base 16: hexadecimal numbers Number symbols are 0 thru F A = 10, B = 11, C = 12, D = 13, E = 14, F = 15 Represented with 4 bits (2 4 = 16) Why are 4 bit representa.ons convenient??? 10/24/17 Matni, CS16, Fa17 31

Natural Numbers Coun_ng 642 as 600 + 40 + 2 is coun_ng in TENS (aka BASE 10) There are 6 HUNDREDS There are 4 TENS There are 2 ONES 2 nd posi_on 6 4 2 100 10 1 1 st posi_on 642 = 600 + 40 + 2 0 th posi_on 10/24/17 Matni, CS16, Fa17 32

Posi_onal Nota_on in Decimal Continuing with our example 642 in base 10 positional notation is: 6 x 10 2 + 4 x 10 1 + 2 x 10 0 = 6 x 100 = 600 = 4 x 10 = 40 = 2 x 1 = 2 = 642 in base 10 10/24/17 Matni, CS16, Fa17 33

Posi_onal Nota_on Anything à DEC What if 642 is expressed in the base of 13? 6 x 13 2 = 6 x 169 = 1014 + 4 x 13 1 = 4 x 13 = 52 + 2 x 13º = 2 x 1 = 2 = 1068 in base 10 So, 642 in base 13 is equivalent to 1068 in base 10 10/24/17 Matni, CS16, Fa17 34

10/24/17 Matni, CS16, Fa17 35

2 10/24/17 Matni, CS16, Fa17 36

Posi_onal Nota_on in Binary 11011 in base 2 positional notation is: 1 x 2 4 = 1 x 16 = 16 + 1 x 2 3 = 1 x 8 = 8 + 1 x 2 2 = 1 x 4 = 4 + 0 x 2 1 = 1 x 2 = 0 + 1 x 2 0 = 1 x 1 = 1 So, 1011 in base 2 is 16 + 8 + 0 + 2 + 1 = 27 in base 10 10/24/17 Matni, CS16, Fa17 37

Conver_ng Binary to Decimal Q: What is the decimal equivalent of the binary number 1101100? A: Look for the posi;on of the digits in the number. This one has 7 digits, therefore posi;ons 0 thru 6 1 x 2 6 = 1 x 64 = 64 + 1 x 2 5 = 1 x 32 = 32 + 0 x 2 4 = 0 x 16 = 0 + 1 x 2 3 = 1 x 8 = 8 + 1 x 2 2 = 1 x 4 = 4 + 0 x 2 1 = 0 x 2 = 0 + 0 x 2º = 0 x 1 = 0 = 108 in base 10 1 1 0 1 1 0 0 64 32 16 8 4 2 1 2 6 2 5 2 4 2 3 2 2 2 1 2 0 10/24/17 Matni, CS16, Fa17 38

Other Relevant Bases I n Computer Science/Engineering, other binary- related numerical bases are used too. OCTAL: Base 8 (note that 8 is 2 3 ) Uses the symbols: 0, 1, 2, 3, 4, 5, 6, 7 HEXADECIMAL: Base 16 (note that 16 is 2 4 ) Uses the symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F 10/24/17 Matni, CS16, Fa17 39

Conver_ng Binary to Octal and Hexadecimal (or any base that s a power of 2) Binary is 1 bit Octal is 3 bits (2 3 = 8) octal is base 8 Hexadecimal is 4 bits (2 4 = 16) hex is base 16 Use the group the bits technique Always start from the least significant digit Group every 3 bits together for bin à oct Group every 4 bits together for bin à hex 10/24/17 Matni, CS16, Fa17 40

Take the example: 10100110 to octal: 1 0 1 0 0 1 1 0 2 4 6 to hexadecimal: 1 0 1 0 0 1 1 0 10 6 Conver_ng Binary to Octal and Hexadecimal 246 in octal Decimal symbols A6 in hexadecimal 10/24/17 Matni, CS16, Fa17 41 0 1 2 3 4 5 6 7 8 9 A B C D E F Octal symbols Hex. symbols

Conver_ng Decimal to Other Bases Algorithm for conver_ng number in base 10 to other bases While (the quotient is not zero) 1. Divide the decimal number by the new base 2. Make the remainder the next digit to the left in the answer 3. Replace the original decimal number with the quotient 4. Repeat until your quotient is zero EXAMPLE: Convert the decimal (base 10) number 79 into hexadecimal (base 16) 79 / 16 = 4 R 15 (15 in hex is the symbol F ) 4 / 16 = 0 R 4 The answer is: 4F 10/24/17 Matni, CS16, Fa17 42

Conver_ng Decimal into Binary Convert 54 (base 10) into binary and hex: 54 / 2 = 27 R 0 27 / 2 = 13 R 1 13 / 2 = 6 R 1 6 / 2 = 3 R 0 3 / 2 = 1 R 1 1 / 2 = 0 R 1 110110 54 (decimal) = (binary) = 36 (hex) Sanity check: 110110 = 2 + 4 + 16 + 32 = 54 10/24/17 Matni, CS16, Fa17 43

10/24/17 Matni, CS16, Fa17 44

q Turn in HW4 on Thursday YOUR TO- DOs q Lab 4 due Fri. 10/27 q HW5 will be released on Thursday, will be due in 1 week. q Visit Prof s and TAs office hours if you need help! 10/24/17 Matni, CS16, Fa17 45

10/24/17 Matni, CS16, Fa17 46