EG1010
monday
--------
went for a Lab session for eg1010. Nothing new really.My breadboard SCREWED UP.Not my fault. ==
used an Inverter IC. self explanatory hmm...
if input is 1, out put is 0
if input is 0,output is 1
simple
also used an "AND" IC
how does it work?...well..
if input is 0 x 0 , the output will be 0
if input is 1x0, the output will still be 0
same goes for 0x1
the output will only be "1" IF..all the input is 1..
which also means..all the inputs are "HIGH"
--------------------------------------
NAND ic is the opposite of AND ic
therefore if
input is 0 x 0 , the output will be 1
if input is 1x0, the output will still be 1
same goes for 0x1
the output will only be "0" IF..all the input is 1..which also means..all the inputs are "HIGH"
not to self*
there can be more than 2 inputs for both AND and NAND ics
-------------------------------------------------------------------------------------
OR ic
if any input is 1, output will be 1
NOR ic
inverse of OR ic
----------------------------------------------------------------------------------------
still not sure for the rest of ICS..but im still getting there
BINARY numbers
note to stupid self*
dont sit behind the lecture hall during EG1010 lecture. DOTA-ers will distract you with their laptops and they might accidentally spill their bubble tea on you
basturts
the recent 1010 lecture was about binary numbers
how to transform a decimal number to a binary number
note to himbotic self*
Binary nubers consist of 1 and o O-N-L-Y
eg
transform 369 (salakau) <-decimal number into a Binary number
simple
divide the number until there's nothing left
2(369) 1
2(184) 0
2(92) 0
2(46) 0
2(11) 1
2(5) 1
2(2) 0
2(0) 0
wookay...so the 369 in binary is 00110001
note to self*
dont let any ah bengs,ah lians read this blog
"OI!! IM from 00110001 !! WANT FIGHT ISSIT!? "
take note that*
the left-est number is the MSB aka Most significant BIT and the right-est number is LSB aka Least significant bit but
who really cares about the LSB hmm?
MSB determines whether the number is positive or negative
im not really sure on this one...but for now, i'll assume 0 as positive since 369 is a positive number
-----------------------------------------------------------------------------------------------
Addition,Subtraction, Mati-pication ( X_X ) ,and TV-sion of Binary numbers ( si beh dumb..the computer do this for you )
but oh well
*searches school bag for notes*
Stickynote on the head to self*
dont confuse yourself with normal MATHS. DONT
-----------------------------------------------------------------------------------------------
1 and 2 complement
i have no idea why they have such a theory...maybe they want to make everything intricate so they make us do this
using 369 as reference
00110001
first step
invert the binary number so it will be 1 complement
11001110
step 2
ADD 1 to complement 1 so i t will be complement 2
so if im not wrong it will be
110011101.
Subscribe to:
Posts (Atom)