DOC PREVIEW
Rutgers University CS 105 - Nonparametric Density Estimation Unsupervised Learning - Clustering

This preview shows page 1-2-3-4 out of 12 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 12 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Lecture 5:Machine LanguageCS442: Great Insights in Computer ScienceMichael L. Littman, Spring 2006Recap• Using logic gates, we know how to do a bunch of things with bits:• add• test equality• if-then-else gate• select one bit from a set (universal gate)What Can We Do?• Lots: Any function of bits, we can specify with logic gates.• But, creating dedicated circuitry for every new problem is daunting and inefficient.• Would like a way of using a fixed set of circuits to act like any circuitry we might want.• Trade gates for time...Recipe for squaresx takes on the value of the first 11 squaresx = 0y = 1z = 2for i in range(0,11):x = x + yy = y + zList of Squaresixyz00121132245239724169252511263613274915286417298119210100212“=” means “assignment”Memory• Need a place to store the various quantities we’re working with.• Main memory is like a giant filing cabinet, where each drawer is numbered consecutively and can store one byte.• Need to be able to store and retrieve values.Memory Circuitaddressmem[0] ... mem[21] ... mem[63]Content of mem[21] if address = 21 (010101)Otherwise, FFFFFFFF[F, T, F, T, F, T]EQUAL6IFTHENELSE8[F, F, F, F, F, F, F, F]Similar circuits for the other 63 locations.64-byte-inputbitwise ORContent of mem[address] • Let’s say there are 64 memory locations, 0-255.• Each one has an 6-bit name called its “address”.• Memory circuit takes the contents of memory (64 x 8 bits) and an address, 518 bits in all, & outputs the byte stored at the corresponding address.Memory Lookupdef memlookup(add, mem): mem00 = mem[0] mem01 = ifthenelse8(equal8(intToByte( 1),add), mem[ 1], mem00) mem02 = ifthenelse8(equal8(intToByte( 2),add), mem[ 2], mem01) mem03 = ifthenelse8(equal8(intToByte( 3),add), mem[ 3], mem02) mem04 = ifthenelse8(equal8(intToByte( 4),add), mem[ 4], mem03) mem05 = ifthenelse8(equal8(intToByte( 5),add), mem[ 5], mem04) mem06 = ifthenelse8(equal8(intToByte( 6),add), mem[ 6], mem05) mem07 = ifthenelse8(equal8(intToByte( 7),add), mem[ 7], mem06) mem08 = ifthenelse8(equal8(intToByte( 8),add), mem[ 8], mem07) mem09 = ifthenelse8(equal8(intToByte( 9),add), mem[ 9], mem08) mem10 = ifthenelse8(equal8(intToByte(10),add), mem[10], mem09) mem11 = ifthenelse8(equal8(intToByte(11),add), mem[11], mem10) mem12 = ifthenelse8(equal8(intToByte(12),add), mem[12], mem11) mem13 = ifthenelse8(equal8(intToByte(13),add), mem[13], mem12) mem14 = ifthenelse8(equal8(intToByte(14),add), mem[14], mem13) mem15 = ifthenelse8(equal8(intToByte(15),add), mem[15], mem14) mem16 = ifthenelse8(equal8(intToByte(16),add), mem[16], mem15) mem17 = ifthenelse8(equal8(intToByte(17),add), mem[17], mem16) mem18 = ifthenelse8(equal8(intToByte(18),add), mem[18], mem17) mem19 = ifthenelse8(equal8(intToByte(19),add), mem[19], mem18) mem20 = ifthenelse8(equal8(intToByte(20),add), mem[20], mem19) mem21 = ifthenelse8(equal8(intToByte(21),add), mem[21], mem20) mem22 = ifthenelse8(equal8(intToByte(22),add), mem[22], mem21) mem23 = ifthenelse8(equal8(intToByte(23),add), mem[23], mem22) mem24 = ifthenelse8(equal8(intToByte(24),add), mem[24], mem23) mem25 = ifthenelse8(equal8(intToByte(25),add), mem[25], mem24) mem26 = ifthenelse8(equal8(intToByte(26),add), mem[26], mem25) mem27 = ifthenelse8(equal8(intToByte(27),add), mem[27], mem26) mem28 = ifthenelse8(equal8(intToByte(28),add), mem[28], mem27) mem29 = ifthenelse8(equal8(intToByte(29),add), mem[29], mem28) mem30 = ifthenelse8(equal8(intToByte(30),add), mem[30], mem29) mem31 = ifthenelse8(equal8(intToByte(31),add), mem[31], mem30) mem32 = ifthenelse8(equal8(intToByte(32),add), mem[32], mem31) mem33 = ifthenelse8(equal8(intToByte(33),add), mem[33], mem32) mem34 = ifthenelse8(equal8(intToByte(34),add), mem[34], mem33) mem35 = ifthenelse8(equal8(intToByte(35),add), mem[35], mem34) mem36 = ifthenelse8(equal8(intToByte(36),add), mem[36], mem35) mem37 = ifthenelse8(equal8(intToByte(37),add), mem[37], mem36) mem38 = ifthenelse8(equal8(intToByte(38),add), mem[38], mem37) mem39 = ifthenelse8(equal8(intToByte(39),add), mem[39], mem38) mem40 = ifthenelse8(equal8(intToByte(40),add), mem[40], mem39) mem41 = ifthenelse8(equal8(intToByte(41),add), mem[41], mem40) mem42 = ifthenelse8(equal8(intToByte(42),add), mem[42], mem41) mem43 = ifthenelse8(equal8(intToByte(43),add), mem[43], mem42) mem44 = ifthenelse8(equal8(intToByte(44),add), mem[44], mem43) mem45 = ifthenelse8(equal8(intToByte(45),add), mem[45], mem44) mem46 = ifthenelse8(equal8(intToByte(46),add), mem[46], mem45) mem47 = ifthenelse8(equal8(intToByte(47),add), mem[47], mem46) mem48 = ifthenelse8(equal8(intToByte(48),add), mem[48], mem47) mem49 = ifthenelse8(equal8(intToByte(49),add), mem[49], mem48) mem50 = ifthenelse8(equal8(intToByte(50),add), mem[50], mem49) mem51 = ifthenelse8(equal8(intToByte(51),add), mem[51], mem50) mem52 = ifthenelse8(equal8(intToByte(52),add), mem[52], mem51) mem53 = ifthenelse8(equal8(intToByte(53),add), mem[53], mem52) mem54 = ifthenelse8(equal8(intToByte(54),add), mem[54], mem53) mem55 = ifthenelse8(equal8(intToByte(55),add), mem[55], mem54) mem56 = ifthenelse8(equal8(intToByte(56),add), mem[56], mem55) mem57 = ifthenelse8(equal8(intToByte(57),add), mem[57], mem56) mem58 = ifthenelse8(equal8(intToByte(58),add), mem[58], mem57) mem59 = ifthenelse8(equal8(intToByte(59),add), mem[59], mem58) mem60 = ifthenelse8(equal8(intToByte(60),add), mem[60], mem59) mem61 = ifthenelse8(equal8(intToByte(61),add), mem[61], mem60) mem62 = ifthenelse8(equal8(intToByte(62),add), mem[62], mem61) mem63 = ifthenelse8(equal8(intToByte(63),add), mem[63], mem62) return mem63Writing to Memoryaddressmem[0] ... mem[21] ... mem[63]Content of newval if address = 21 (010101)Otherwise, mem[21] (no change)[F, T, F, T, F, T]EQUAL6IFTHENELSE8Similar circuits for the other 63 locations.newvalmem[0] ... mem[21] ... mem[63]• Similar circuit allows memory cells to be altered.• mem[address] = newval• If needed for future processing, copied back up at the end of the cycle.Memory Writedef memwrite(active, add, mem, val): return [


View Full Document

Rutgers University CS 105 - Nonparametric Density Estimation Unsupervised Learning - Clustering

Download Nonparametric Density Estimation Unsupervised Learning - Clustering
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Nonparametric Density Estimation Unsupervised Learning - Clustering and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Nonparametric Density Estimation Unsupervised Learning - Clustering 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?