Opening the book…
Let us begin with the simplest possible Simulink model: adding two numbers. This example is not exciting mathematically, but it is very useful because it teaches the basic workflow: choose blocks, connect blocks, set parameters, run the model, and view the result.
The model will calculate 5 + 3. The output should be 8.
Blocks needed:
- Two Constant blocks
- One Sum block
- One Display block
Build the model using these steps:
1. Open a blank Simulink model.
2. From Sources or Commonly Used Blocks, drag a Constant block into the model.
3. Copy the constant block so you have two constant blocks. You can do this by either dragging a second constant block into the model or by right-clicking the first constant block and dragging it to create a duplicate.
4. Double-click the first Constant block and set its value to 5.
5. Double-click the second Constant block and set its value to 3.
6. From Math Operations or Commonly Used Blocks, drag a Sum block into the model.
7. Connect both Constant blocks to the Sum block.
8. From Sinks, drag a Display block into the model.
9. Connect the Sum block output to the Display block.
10. Set the Stop Time to 0 because nothing in this model changes with time.
11. Save the model and click Run.

The Display block should show the result 8. In this model, the values do not depend on time, so setting the Stop Time to 0 is reasonable. Later, when we work with signals that change with time, we will use a longer stop time, such as 10 or 15 seconds.
Showing and renaming block names
If a block name is hidden, click the block and use the small menu below it to show the block name. To rename a block, click the block label and type a more meaningful name. Meaningful labels are helpful when your models become larger.

This page titled 11.5: Example- Adding Two Numbers was last modified on Tue, 30 Jun 2026 02:11:49 GMT and is shared under a CC BY-NC-SA license and was authored, remixed, and/or curated by Zara Noroozi.
The book could not be loaded just now.