Meeting Summary — CS 315-01 Lecture/Lab (Fall 2025)
Date: Sep 16, 2025
Time: 08:09 AM Pacific Time (US and Canada)
Meeting ID: 886 4953 2573
Quick Recap
Focus on memory representation: byte ordering, endianness, and two’s complement for negative numbers.
Practical C examples: pointer arithmetic, string handling, and memory manipulation.
Administrative items: Project 3 deadlines and upcoming interactive grading.
Troubleshooting support for student technical issues.
Next Steps
No next steps were provided; no action items were listed.
Detailed Summary
Memory Representation and Assembly Basics
The lesson covered memory representation, complement notation for negative integers, and working with structs in assembly.
A “Hello, World” example was planned to illustrate function calls and string handling, addressing prior issues with call conventions that can cause crashes.
The session connected high-level programming concepts to their memory layout, laying groundwork for upcoming topics on machine instructions and digital circuits.
Memory and Data Representation Concepts
Memory was presented as an array of bytes.
Endianness was defined:
Big-endian vs. little-endian storage orders.
Further exploration via programming exercises was suggested for the following week.
C Byte Access and Memory
Demonstrated accessing individual bytes in C using:
Pointer arithmetic
Type casting
Dereferencing
Used GDB to inspect memory and verify byte order.
A practical example confirmed a little-endian memory layout.
Byte Order and Network Protocols
Discussed the impact of byte order on computation and networking.
Explained the lack of a universal standard for endianness.
Noted TCP/IP’s role in reliable data delivery.
Linked these concepts to pointer use in the RISC-V emulator project, emphasizing memory addressing and data manipulation in C.
Understanding Two’s Complement Representation
Reviewed signed integer representations and why two’s complement is standard.
Compared sign-magnitude and one’s complement, highlighting their drawbacks.
Demonstrated two’s complement conversion using the “invert bits and add one” method.
Emphasized scalability and arithmetic simplicity without lookup tables.
Binary Number Conversion Techniques
Showed sign extension for changing bit widths (e.g., 4-bit to 8-bit), preserving lower bits and extending the sign bit.
Covered truncation to smaller bit widths and implications.
Teed up continued work with two’s complement and upcoming discussion of strings and characters in assembly.
Technical Troubleshooting Support Session
Resolved two issues for a student (Sam):
SSH access: removed an unnecessary private key; ensured the correct fully qualified domain name.
GitHub repository: recommended pulling on Beagle and, if needed, renaming and recloning to resolve conflicts.
C Pointer and Bitwise Operations
Clarified pointers and type casting in C:
Pointers hold 64-bit addresses; the pointed-to type determines read/write size.
Encouraged breaking complex pointer expressions into simpler steps.
Demonstrated bitwise operations (bit inversion, add-one) to move between positive and negative representations.
Reviewed conversions between decimal and hexadecimal and the logic behind related bitwise operations.
C and Assembly String Manipulation
Explained C strings as null-terminated sequences in memory.
Reviewed assembly load instructions: load word, load double, load byte.
Implemented string length in both C and assembly, emphasizing:
Pointers and loop structure
Clear loop labeling
Memory address manipulation
Discussed returning values in assembly (where to store the length).
Project 3 and Interactive Grading
Project 3 is due Monday night.
Interactive grading will occur next Tuesday instead of lectures.
Students were advised to practice terminal-based editors and GDB for debugging assembly.
The session also covered string copy in assembly (array indexing and memory addressing).
Project 3 materials were to be released the same day, with lab time allocated for exam problems and project work.
Back to top