14 - Signed Numbers and Arithmetic Overflow

  Рет қаралды 4,678

Anas Salah Eddin

Anas Salah Eddin

Күн бұрын

Пікірлер: 2
@Samet-qv9yf
@Samet-qv9yf Жыл бұрын
sir, can you please explain the overflow step? i didn't really get what you've done. if overflow result is 0 that means theres no error else if its 1 that means theres an error. If MSB of x and MSB of xored are equal to each other and not equal to MSB of s, we get error, right? so in this case we can just write if ( x[n-1] == xored y[n-1] && x[n-1] != s[n-1] overflow = 1; else overflow = 0;
@sharafmakk2936
@sharafmakk2936 3 ай бұрын
Two cases: you interpret that numbers as unsigned -> overflow doesn't tell you anything, it's just a random signal of some bits in the input, while the carry out should really be interpreted as the fifth bit of s, because it literally is. if you treat the numbers as signed -> the overflow tells you that you added two positive or negative numbers and got something that cannot be expressed in the range, like you added to positive numbers (have 0 at MSB) and got a negative number in s(has MSB 1), which is obviously false. the carry out can be explained in terms of when it happens mathematically, but for our purposes, it doesn't matter, it just means that bitwise addition of the two representations of the numbers give out a carry.
15 - Verilog Arithmetic Operators
16:07
Anas Salah Eddin
Рет қаралды 7 М.
The First Amiga Virus - Something Wonderful Has Happened
17:05
Modern Vintage Gamer
Рет қаралды 86 М.
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 54 МЛН
Google’s Quantum Chip: Did We Just Tap Into Parallel Universes?
9:34
M12 - 1 - Sinusoidal Steady-State Analysis: Introduction
12:29
Anas Salah Eddin
Рет қаралды 73
Oxford University Entrance test Tricks!✍️🖋️📘💙
9:03
Digital To Analog Conversion (D/A) by Dr Alkesh Agrawal
15:29
ETronicsLecturesbyDrAlkesh Agrawal
Рет қаралды 641
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 54 МЛН