# 4 bit ALU circuit

#### joegreentea

Joined Nov 22, 2011
8
Hi,

Suppose I have this 1-bit ALU circuit, If I need to add an overflow, should I add it between C in and C out? Eventually, I need to put the 1-bit ALU together to become 4-bit ALU with overflow.

#### Attachments

• 20.9 KB Views: 72
• 23.7 KB Views: 85

#### stahta01

Joined Jun 9, 2011
133
I forget how does overflow differ from carry out?

Tim S.

#### joegreentea

Joined Nov 22, 2011
8
I forget how does overflow differ from carry out?

Tim S.
Or maybe they are the same, the final carry out is overflow, how about the first carry in - in the 4-bit ALU, what it suppose to be?
Thanks,
Danny

#### Georacer

Joined Nov 25, 2009
5,182
If there is a carry out, then this is an indication that an overflow has occurred and thus the result is invalid. The carry in is a useful pin that does what it says. It provides a way to insert a carry in an operation. Is there something more to it?

#### joegreentea

Joined Nov 22, 2011
8
If there is a carry out, then this is an indication that an overflow has occurred and thus the result is invalid. The carry in is a useful pin that does what it says. It provides a way to insert a carry in an operation. Is there something more to it?
I was just curious, if I should leave it be or put a constant 0 or 1.

#### Georacer

Joined Nov 25, 2009
5,182
You want a constant 0 there. There is no carry in in a fresh, new operation. It would be like wanting to find how much is 1+1 and adding an extra 1 (as carry in) for some reason.
{"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8232019543647766, "perplexity": 1675.6995866715172}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-43/segments/1634323585265.67/warc/CC-MAIN-20211019105138-20211019135138-00214.warc.gz"}